尝试安装模块时,npm抛出ENOENT错误

时间:2017-07-24 15:22:46

标签: node.js npm npm-install

该模块的文档告诉我运行npm install --save mapbox-gl但是当我尝试这个时,我收到以下错误。

npm ERR! addLocal Could not install 
/Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec
npm WARN deprecated point-geometry@0.0.0: This module has moved: please 
install @mapbox/point-geometry instead
npm WARN deprecated vector-tile@1.3.0: This module has moved: please 
install @mapbox/vector-tile instead
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "mapbox-gl"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! path /Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open 
'/Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec'
npm ERR! enoent ENOENT: no such file or directory, open 
'/Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec'
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/marchorne/conichi/cmc/npm-debug.log

我的系统是MacOS Sierra 10.12.5 节点版本:v6.10.0 NPM版本:v3.10.10

1 个答案:

答案 0 :(得分:0)

v0.39似乎已被打破,请参阅https://github.com/mapbox/mapbox-gl-js/issues/5025

您可以尝试使用npm install --save mapbox-gl@0.38.0

安装以前的版本