npm尝试安装模块时抛出ENOENT错误
问题描述:
该模块的文档告诉我运行npm install --save mapbox-gl
,但是当我尝试此操作时,我收到以下错误。npm尝试安装模块时抛出ENOENT错误
npm ERR! addLocal Could not install
/Users/marchorne/conichi/cmc/node_modules/mapbox-gl/src/style-spec
npm WARN deprecated [email protected]: This module has moved: please
install @mapbox/point-geometry instead
npm WARN deprecated [email protected]: 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的塞拉利昂10.12.5 节点版本:v6.10.0 NPM版本:v3.10.10
答
v0.39似乎被打破看到https://github.com/mapbox/mapbox-gl-js/issues/5025
你可以尝试使用npm install --save [email protected]
安装以前的版本