【发布时间】:2015-11-10 22:22:44
【问题描述】:
我正在使用npm3.3.6,当我尝试安装一堆模块时,我收到以下错误:
npm i babel-cli babel-plugin-syntax-async-functions babel-plugin-transform-regenerator babel-polyfill babel-preset-es2015 babelify watchify browserify --save-dev
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/thomas/.nvm/versions/node/v5.0.0/bin/node" "/Users/thomas/.nvm/versions/node/v5.0.0/bin/npm" "i" "babel-cli" "babel-plugin-syntax-async-functions" "babel-plugin-transform-regenerator" "babel-polyfill" "babel-preset-es2015" "babelify" "watchify" "browserify" "--save-dev"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! path /Users/thomas/Desktop/esnext-bootstrap/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents/node_modules/asn1
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/thomas/Desktop/esnext-bootstrap/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents/node_modules/asn1' -> '/Users/thomas/Desktop/esnext-bootstrap/node_modules/asn1'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/thomas/Desktop/esnext-bootstrap/npm-debug.log
我不知道这里发生了什么,也不知道具体是什么模块导致了这个问题。我可以看到它涉及babel-cli、chokidar 和ans1,但是当我单独安装babel-cli 时,它可以正常工作而不会出现错误。
刚刚单独安装了每个模块,效果很好。
【问题讨论】:
-
我刚刚运行了一个完整的测试,将每个模块分别安装和一起安装,没有发生错误。我两次都删除了
node_modules文件夹。如果有人想重新创建这里是starter repo。