抱歉,如果这个问题已经得到解答,但我看不到任何人得到这个错误。
使用工头,我可以看到我的应用程序成功运行,但是在部署到 Heroku 时,我收到以下错误:
Counting objects: 717, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (617/617), done.
Writing objects: 100% (717/717), 3.22 MiB | 305 KiB/s, done.
Total 717 (delta 61), reused 0 (delta 0)
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.6.20
Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
express@3.0.6 ./node_modules/express
â"oâ"?â"? range-parser@0.0.4
â"oâ"?â"? cookie-signature@0.0.1
â"oâ"?â"? fresh@0.1.0
â"oâ"?â"? methods@0.0.1
â"oâ"?â"? mkdirp@0.3.3
â"oâ"?â"? cookie@0.0.5
â"oâ"?â"? debug@0.7.0
â"oâ"?â"? buffer-crc32@0.1.1
â"oâ"?â"? commander@0.6.1
â"oâ"?â"? send@0.1.0 (mime@1.2.6)
â""â"?â"? connect@2.7.2
npm ERR! Error: ENOENT, chmod '/tmp/build_2phd1ent7ca7q/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/bin/uglifyjs'
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.32-348-ec2
npm ERR! command "/tmp/node-node-UFfk/bin/node" "/tmp/node-npm-Mvon/cli.js" "rebuild"
npm ERR! cwd /tmp/build_2phd1ent7ca7q
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.0.106
npm ERR! path /tmp/build_2phd1ent7ca7q/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/bin/uglifyjs
npm ERR! code ENOENT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_2phd1ent7ca7q/npm-debug.log
npm not ok
! Failed to rebuild dependencies with npm
! Heroku push rejected, failed to compile Node.js app
我想这与 socket.io 依赖关系有关,但我知识渊博,无法确切知道是什么。我创建了一个新的 git 存储库并从另一个存储库复制了它,因为该项目不在该存储库的根目录中,因此无法推送到 heroku,所以也许这与它有关。
任何帮助将不胜感激。