[英]Heroku cannot find module 'spawn-sync'
I am trying to install my node project to run online however when i try to push to heroku master I get errors. 我试图安装我的节点项目以在线运行,但是当我尝试推送到heroku master时出现错误。 I followed these steps: https://devcenter.heroku.com/articles/getting-started-with-nodejs#push-local-changes the first error is:
我按照以下步骤操作: 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)
I tried to install de module with npm install spawn-sync --save
and runned git add -A
and git commit -m "added spawn-sync"
and again tried to git push heroku master
but the error keeps coming up. 我试图用
npm install spawn-sync --save
安装de module并npm install spawn-sync --save
git add -A
和git commit -m "added spawn-sync"
然后再次尝试git push heroku master
但是错误不断出现。 I'm working in a branch and i'm in the root folder of my application. 我在分支机构工作,并且在应用程序的根文件夹中。 Does anyone know how to fix this
有谁知道如何解决这一问题
Make sure you're on the master branch. 确保您在master分支上。 If you're not working on
master
, you should push to heroku like git push heroku branchYouAreOn:master
. 如果您不在
master
工作,则应像git push heroku branchYouAreOn:master
一样推送到heroku。
Make sure spawn-sync
is listed in dependencies
in your package.json file. 确保在您的package.json文件的
dependencies
中列出了spawn-sync
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.