简体   繁体   English

NPM 找不到 type@module 的匹配版本

[英]NPM no matching version found for type@module

When I try the nodemailer module, the following log error pops up:当我尝试使用 nodemailer 模块时,会弹出以下日志错误:

0 verbose cli [
0 verbose cli   '/usr/local/bin/node',
0 verbose cli   '/usr/local/bin/npm',
0 verbose cli   'install',
0 verbose cli   'nodemailer'
0 verbose cli ]
1 info using npm@7.12.1
2 info using node@v15.7.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 0ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/home/ubuntu/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:validate Completed in 1ms
15 timing config:load:credentials Completed in 1ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 8ms
18 timing npm:load:configload Completed in 9ms
19 timing npm:load:setTitle Completed in 0ms
20 timing npm:load:setupLog Completed in 2ms
21 timing npm:load:cleanupLog Completed in 3ms
22 timing npm:load:configScope Completed in 0ms
23 timing npm:load:projectScope Completed in 1ms
24 timing npm:load Completed in 16ms
25 timing config:load:flatten Completed in 4ms
26 timing arborist:ctor Completed in 1ms
27 timing idealTree:init Completed in 177ms
28 timing idealTree:userRequests Completed in 4ms
29 silly idealTree buildDeps
30 silly fetch manifest nodemailer@^4.7.0
31 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules
32 http fetch GET 304 https://registry.npmjs.org/nodemailer 220ms (from cache)
33 silly fetch manifest type@module
34 http fetch GET 304 https://registry.npmjs.org/type 42ms (from cache)
35 silly placeDep ROOT nodemailer@4.7.0 OK for: biogoapp@1.0.0 want: ^4.7.0
36 silly placeDep ROOT type@ OK for: biogoapp@1.0.0 want: module
37 timing idealTree:#root Completed in 284ms
38 timing idealTree:node_modules/nodemailer Completed in 0ms
39 timing idealTree:node_modules/type Completed in 0ms
40 timing idealTree:buildDeps Completed in 285ms
41 timing idealTree:fixDepFlags Completed in 4ms
42 timing idealTree Completed in 471ms
43 timing command:install Completed in 502ms
44 verbose type tag
45 verbose stack type: No matching version found for type@module.
45 verbose stack     at module.exports (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
45 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
45 verbose stack     at async Arborist.[nodeFromEdge] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:947:19)
45 verbose stack     at async Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:893:11)
45 verbose stack     at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
45 verbose stack     at async Promise.all (index 1)
45 verbose stack     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:135:5)
45 verbose stack     at async Install.install (/usr/local/lib/node_modules/npm/lib/install.js:137:5)
46 verbose cwd /home/ubuntu
47 verbose Linux 5.8.0-29-generic
48 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "nodemailer"
49 verbose node v15.7.0
50 verbose npm  v7.12.1
51 error code ETARGET
52 error notarget No matching version found for type@module.
53 error notarget In most cases you or one of your dependencies are requesting
53 error notarget a package version that doesn't exist.
54 verbose exit 1

I tried to remove package_lock and node_modules but any installation via npm ends with an error: notarget No matching version found for type @ module.我试图删除 package_lock 和 node_modules,但是通过 npm 进行的任何安装都以错误结束:notarget No matching version found for type @ module。 I'm just learning node any tips will be of great help.我只是在学习节点,任何提示都会有很大帮助。 Attempts at various solutions found on google to similar errors did not produce results.尝试在谷歌上找到类似错误的各种解决方案并没有产生结果。

I solved by doing npm install -g instead - not sure what the long-term consequences might be but it works for now.我通过做npm install -g解决了 - 不确定长期后果可能是什么,但它现在有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM