繁体   English   中英

Heroku找不到模块“ spawn-sync”

[英]Heroku cannot find module 'spawn-sync'

我试图安装我的节点项目以在线运行,但是当我尝试推送到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 module并npm install spawn-sync --save git add -Agit commit -m "added spawn-sync"然后再次尝试git push heroku master但是错误不断出现。 我在分支机构工作,并且在应用程序的根文件夹中。 有谁知道如何解决这一问题

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM