【问题标题】:NPM install error MEAN.js sample application on Amazon EC2 Linux?NPM 在 Amazon EC2 Linux 上安装错误 MEAN.js 示例应用程序?
【发布时间】:2015-09-21 15:51:43
【问题描述】:

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

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 install 自动完成,但可能不是因为它被 npm 错误停止。

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

【问题讨论】:

    标签: node.js amazon-web-services amazon-ec2 meanjs


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2015-12-24
      • 2021-06-16
      • 1970-01-01
      • 2011-06-20
      • 2013-04-27
      • 2017-09-22
      • 2017-01-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多