Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js npm错误!错误:spawn enoint_Node.js_Heroku_Github_Npm - Fatal编程技术网

Node.js npm错误!错误:spawn enoint

Node.js npm错误!错误:spawn enoint,node.js,heroku,github,npm,Node.js,Heroku,Github,Npm,当我试图将我的代码推送到heroku时,我得到了以下错误。早些时候一切正常。突然出了点问题 -----> Node.js app detected Node engine: 0.10.x Npm engine: 1.1.x Start mechanism: Procfile node_modules source: prebuilt node_modules cached: t

当我试图将我的代码推送到heroku时,我得到了以下错误。早些时候一切正常。突然出了点问题

-----> Node.js app detected

       Node engine:         0.10.x
       Npm engine:          1.1.x
       Start mechanism:     Procfile
       node_modules source: prebuilt
       node_modules cached: true

       NPM_CONFIG_PRODUCTION=true
       NODE_MODULES_CACHE=true

-----> Installing binaries
       Resolving node version 0.10.x via semver.io...
       Downloading and installing node 0.10.35...
       Resolving npm version 1.1.x via semver.io...
       Downloading and installing npm 1.1.71 (replacing version 1.4.28)...

-----> Building dependencies
       Rebuilding any native modules for this architecture
       npm WARN package.json OutboxProApi@0.0.1 No README.md file found!
       npm ERR! Error: spawn ENOENT
       npm ERR!     at errnoException (child_process.js:1011:11)
       npm ERR!     at Process.ChildProcess._handle.onexit (child_process.js:802:34)
       npm ERR! If you need help, you may report this log at:
       npm ERR!     <http://github.com/isaacs/npm/issues>
       npm ERR! or email it to:
       npm ERR!     <npm-@googlegroups.com>

       npm ERR! System Linux 3.8.11-ec2
       npm ERR! command "node" "/tmp/build_fc3e8717fd7f68f9f6a9e93833388643/.heroku/node/bin/npm" "rebuild"
       npm ERR! cwd /tmp/build_fc3e8717fd7f68f9f6a9e93833388643
       npm ERR! node -v v0.10.35
       npm ERR! npm -v 1.1.71
       npm ERR! syscall spawn
       npm ERR! code ENOENT
       npm ERR! errno ENOENT
       npm ERR! 
       npm ERR! Additional logging details can be found in:
       npm ERR!     /tmp/build_fc3e8717fd7f68f9f6a9e93833388643/npm-debug.log
       npm ERR! not ok code 0

-----> Build failed

       WARNING: Avoid checking node_modules into source control
       https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-

       WARNING: This version of npm (1.1.71) has several known issues - consider upgrading to the latest release (2.1.18)
       https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version

       We're sorry this build is failing! If you can't find the issue in application code,
       please submit a ticket so we can help: https://help.heroku.com/
       You can also try reverting to our legacy Node.js buildpack:
       heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v63

       Love,
       Heroku

请帮我解决这个问题。多谢各位

通过将npm更新为稳定版本,我成功地解决了这个问题

"engines": {
    "node": "0.10.x",
    "npm": "2.1.x"
  }

您可以在package.json中更新npm版本,因为您提供的npm版本已过期

"engines": {
   .... /*other settings*/
    "npm": "2.1.x" /* latest version*/
 }

将解决问题。

您的计算机上必须安装msysgit。另外,我的Git安装路径是“C:\ProgramFiles(x86)\Git”。你的可能不一样。继续之前,请检查您的位置


msysgit(gitforwindows.org)访问此网站您可以下载Git

您使用的是最新版本的Node,但npm 1.1.x已经有几年历史了。也许可以尝试更新一下。@Steve谢谢你Steve。让我知道如何在不更新其他模块的情况下将npm 1.1.x更新到更高版本。有相同的问题。如上所述,将节点更新为0.10对我来说很有效。嗨,卡哈尔,欢迎来到堆栈溢出。如果你想添加信息或澄清某些事情,你可以编辑你的答案,而不是对其进行评论
"engines": {
   .... /*other settings*/
    "npm": "2.1.x" /* latest version*/
 }