NPM找不到模块' @ npmcorp / copy'

时间:2017-03-14 18:04:31

标签: windows npm npm-install

尝试在Windows上安装Parsoid时出现此错误,也尝试安装其他软件包。

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\mbart\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'parsoid' ]
2 info using npm@4.4.2
3 info using node@v7.7.2
4 verbose stack Error: Cannot find module '@npmcorp/copy'
4 verbose stack     at Function.Module._resolveFilename (module.js:470:15)
4 verbose stack     at Function.Module._load (module.js:418:25)
4 verbose stack     at Module.require (module.js:498:17)
4 verbose stack     at require (internal/module.js:20:19)
4 verbose stack     at Object.<anonymous> (C:\Users\mbart\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcorp\move\move.js:7:12)
4 verbose stack     at Module._compile (module.js:571:32)
4 verbose stack     at Object.Module._extensions..js (module.js:580:10)
4 verbose stack     at Module.load (module.js:488:32)
4 verbose stack     at tryModuleLoad (module.js:447:12)
4 verbose stack     at Function.Module._load (module.js:439:3)
5 verbose cwd C:\WINDOWS\system32
6 verbose Windows_NT 10.0.14393
7 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\mbart\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "parsoid"
8 verbose node v7.7.2
9 verbose npm  v4.4.2
10 error code MODULE_NOT_FOUND
11 error Cannot find module '@npmcorp/copy'
12 verbose exit [ 1, true ]

在管理员模式和正常模式下,命令提示符和PowerShell中都会显示错误。在Sys32和其他文件夹中。

通过npm install @npmcorp/copy resluts安装包@ npmcorp / copy同样的错误

2 个答案:

答案 0 :(得分:1)

https://github.com/npm/npm/issues/16037

  

您需要坚持使用npm@latest而不是更新为npm@next。您可能需要清除您的npm安装(通过手动删除安装中的npm目录),因为节点安装程序经常忽略删除文件。

npm@next确实是原因,手动重新安装修复了问题。

答案 1 :(得分:0)

我刚才在Mac OS 10.9上遇到了完全相同的问题:

当我想安装/更新时:

npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module '@npmcorp/move'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/PQ/.npm/_logs/2017-03-15T00_26_59_611Z-debug.log

日志文件:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/5.4.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   'csscomb',
1 verbose cli   '-g' ]
2 info using npm@4.4.2
3 info using node@v5.4.0
4 verbose stack Error: Cannot find module '@npmcorp/move'
4 verbose stack     at Function.Module._resolveFilename (module.js:326:15)
4 verbose stack     at Function.Module._load (module.js:277:25)
4 verbose stack     at Module.require (module.js:354:17)
4 verbose stack     at require (internal/module.js:12:17)
4 verbose stack     at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/move.js:5:12)
4 verbose stack     at Module._compile (module.js:398:26)
4 verbose stack     at Object.Module._extensions..js (module.js:405:10)
4 verbose stack     at Module.load (module.js:344:32)
4 verbose stack     at Function.Module._load (module.js:301:12)
4 verbose stack     at Module.require (module.js:354:17)
4 verbose stack     at require (internal/module.js:12:17)
5 verbose cwd /Users/PQ/Documents/contributing/jQuery.mmenu
6 verbose Darwin 13.4.0
7 verbose argv "/usr/local/Cellar/node/5.4.0/bin/node" "/usr/local/bin/npm" "install" "csscomb" "-g"
8 verbose node v5.4.0
9 verbose npm  v4.4.2
10 error code MODULE_NOT_FOUND
11 error Cannot find module '@npmcorp/move'
12 verbose exit [ 1, true ]

它发生在sudo npm update -g

之后

堆栈跟踪:

npm WARN deprecated node-uuid@1.4.7: use uuid module instead
npm WARN install:mkdirp@0.5.1 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/mkdirp/bin/cmd.js'
npm WARN install:nopt@3.0.6 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/nopt/bin/nopt.js'
npm WARN install:opener@1.4.1 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/opener/opener.js'
npm WARN install:sshpk@1.9.2 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign'
npm WARN install:node-uuid@1.4.7 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/request/node_modules/node-uuid/bin/uuid'
npm WARN install:semver@5.1.0 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/semver/bin/semver'
npm WARN install:har-validator@2.0.6 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/request/node_modules/har-validator/bin/har-validator'
npm WARN install:which@1.2.11 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/which/bin/which'
npm WARN install:rimraf@2.5.4 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/rimraf/bin.js'
/usr/local/bin/budo -> /usr/local/lib/node_modules/budo/bin/cmd.js
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js

> fsevents@1.1.1 install /usr/local/lib/node_modules/budo/node_modules/fsevents
> node install

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-pre-gyp ENOENT
    at exports._errnoException (util.js:856:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:478:9)
    at process._tickCallback (node.js:392:17)
    at Function.Module.runMain (module.js:432:11)
    at startup (node.js:141:18)
    at node.js:1003:3
npm WARN install:fsevents@1.1.1 fsevents@1.1.1 install: `node install`
npm WARN install:fsevents@1.1.1 Exit status 1
- acorn@3.3.0 node_modules/budo/node_modules/detective/node_modules/acorn
- abbrev@1.1.0 node_modules/budo/node_modules/fsevents/node_modules/abbrev
- ansi-regex@2.1.1 node_modules/budo/node_modules/fsevents/node_modules/ansi-regex

... [long list]

- read-installed@4.0.3 node_modules/npm/node_modules/read-installed
- read-package-tree@5.1.5 node_modules/npm/node_modules/read-package-tree
- write-file-atomic@1.3.1 node_modules/npm/node_modules/write-file-atomic
/usr/local/lib
├── @npmcorp/move@1.0.0
├── abbrev@1.1.0
├── ansi-regex@2.1.1

... [some more]

├── validate-npm-package-name@3.0.0
└── write-file-atomic@1.3.1

npm WARN EBUNDLEOVERRIDE Replacing bundled npm > @npmcorp with new installed version

issue刚刚被转入npm的GitHub #16037