NPM在AmazonEC2Linux上安装错误MEAN.js示例应用程序



我使用Mac OS计算机上的shell连接到运行Linux AMI的Amazon EC2实例。然后,我将CD刻录到开发文件中,并对mean.js样板文件/样例应用程序进行git克隆。这里是mean.js的GIT repohttps://github.com/meanjs/mean下面是我遵循的教程https://blog.codeship.com/running-mean-web-application-docker-containers-aws/.然后,我将CD放入meanjs文件夹并运行npm install命令。然后我得到一堆错误间歇性地说npm ERR! registry error parsing json。最后,就在npm安装完成运行之前,它返回以下错误:

npm ERR! Linux 3.14.35-28.38.amzn1.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.13.0-pre
npm ERR! npm  v2.11.2
npm ERR! code ETARGET
npm ERR! notarget No compatible version found: node-pre-gyp@'>=0.6.5 <0.7.0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.3.0","0.3.1","0.3.1-alpha","0.4.0","0.4.1","0.4.2"]
npm ERR! notarget 
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of 'v8-profiler'
npm ERR! notarget 

奇怪的是,我能够在执行bower install命令后运行应用程序,这通常是由npm安装自动完成的,但可能不是因为npm错误而停止。

我注意到错误指的是node pre-gip,这是我不久前为另一个项目在Mac OS上全局安装的东西,所以我做了一个npm卸载node pre-Gip,它说模块没有安装。

在docker容器中构建一个旧节点然后再次运行npm安装

此外,这可以帮助构建节点https://registry.hub.docker.com/u/maccam912/meanjs/dockerfile/

最新更新