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
和 运行ned git add -A
和 git commit -m "added spawn-sync"
安装 de 模块并再次尝试 git push heroku master
但错误不断出现.
我在一个分支机构工作,我在我的应用程序的根文件夹中。
有谁知道如何解决这个问题
确保你在主分支上。如果你不在 master
上工作,你应该像 git push heroku branchYouAreOn:master
.
一样推送到 heroku
确保 spawn-sync
列在 package.json 文件的 dependencies
中。
我正在尝试将我的节点项目在线安装到 运行,但是当我尝试推送到 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
和 运行ned git add -A
和 git commit -m "added spawn-sync"
安装 de 模块并再次尝试 git push heroku master
但错误不断出现.
我在一个分支机构工作,我在我的应用程序的根文件夹中。
有谁知道如何解决这个问题
确保你在主分支上。如果你不在
master
上工作,你应该像git push heroku branchYouAreOn:master
. 一样推送到 heroku
确保
spawn-sync
列在 package.json 文件的dependencies
中。