2017-08-14 42 views
0

我试图使用NPM来创建自定义构建我的快递项目中安装的OpenLayers但我得到以下错误:的OpenLayers安装使用NPM - 没有找到包

npm ERR! 404 Not Found 
npm ERR! 404 
npm ERR! 404 'mapbox/vector-tile' is not in the npm registry. 
npm ERR! 404 You should bug the author to publish it 
npm ERR! 404 It was specified as a dependency of 'openlayers' 
npm ERR! 404 
npm ERR! 404 Note that you can also install from a 
npm ERR! 404 tarball, folder, or http url, or git url. 
npm ERR! System Linux 3.16.0-4-amd64 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "openlayers" 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.21 
npm ERR! code E404 
npm ERR! 
npm ERR! not ok code 0 

我试着更新NPM和手动安装矢量平铺但它没有帮助。

我在做什么错?

编辑:调用npm install ol而不是npm install openlayers时出现同样的错误。

+0

openlayers取决于mapbox矢量图块。您可以尝试使用“npm install @ mapbox/vector-tile”进行安装。我认为下载vector-tile软件包可能会出现一些错误。 –

回答

1

使用更新版本的节点和npm,最好是LTS版本

+0

谢谢!升级到npm 5.3.0解决了我的问题。 – Kathandrax