Heroku找不到模块' spawn-sync'

时间:2015-05-13 08:34:13

标签: node.js heroku

我正在尝试安装我的节点项目以在线运行,但是当我尝试推送到heroku master时,我得到了错误。 我按照以下步骤操作:https://devcenter.heroku.com/articles/getting-started-with-nodejs#push-local-changes 第一个错误是:

remote:        > node lib/install.js
remote:
remote:        module.js:338
remote:            throw err;
remote:                  ^
remote:        Error: Cannot find module 'spawn-sync'
remote:            at Function.Module._resolveFilename (module.js:336:15)
remote:            at Function.Module._load (module.js:278:25)
remote:            at Module.require (module.js:365:17)
remote:            at require (module.js:384:17)
remote:            at Object.<anonymous>        check/index.js:5:17)

我尝试使用npm install spawn-sync --save安装de模块并运行git add -Agit commit -m "added spawn-sync"并再次尝试git push heroku master,但错误不断出现。 我在分支机构工作,并且在我的应用程序的根文件夹中。 有谁知道如何解决这个问题

1 个答案:

答案 0 :(得分:0)

  1. 确保您在主分支上。如果您不在master上工作,则应该像git push heroku branchYouAreOn:master一样推送到heroku。

  2. 确保package.json文件中的spawn-sync中列出了dependencies

相关问题