我有一个完整堆栈项目的工作目录,如下所示:
|__服务器 | |__客户端 | |__ node_modules | |__ package.json
{
"name": "kmail",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"client": "cd client && npm start",
"server": "cd server && npm start",
"start": "concurrently - kill-others \"npm run server\" \"npm run client\""
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"concurrently": "3.5.1"
}
}当我在本地运行这个项目时,它工作得很好。但是,当我将它部署到Heroku时,它失败了,下面是我得到的日志:
Starting process with command 'npm start'
concurrently - kill-others "npm run server" "npm run client"
concurrently - kill-others: not found你知道解决这个问题的办法吗?或者,除了Heroku之外,还有其他主机服务可以帮助解决我的问题吗?非常感谢。
发布于 2019-05-07 16:42:23
那么,“开始”脚本应该启动服务器部分。
"start": "node index.js --prefix server"Heroku寻找“开始”脚本,并实际使用它运行应用程序。
尝试更改它,如果错误持久化,将整个日志粘贴在这里
发布于 2019-09-12 02:51:17
我认为--kill-others不是- kill-others
"start": "concurrently --kill-others \"npm run server\" \"npm run client\""https://stackoverflow.com/questions/56026710
复制相似问题