npm 错误!在 bloggers_den@1.0.0 启动脚本失败。
npm 错误!这可能不是 npm 的问题。上面可能有额外的日志输出。
任何帮助将不胜感激,
应用程序日志
<块引用>2021-07-06T05:33:29.357332+00:00 app[web.1]: npm ERR! blog-mern@1.0.0 开始:node server.js
2021-07-06T05:33:29.357496+00:00 app[web.1]: npm ERR!退出状态 1
2021-07-06T05:33:29.357639+00:00 应用程序[web.1]: npm ERR!
2021-07-06T05:33:29.357716+00:00 app[web.1]: npm ERR! blog-mern@1.0.0 启动脚本失败。
2021-07-06T05:33:29.357838+00:00 app[web.1]: npm ERR!这可能不是 npm 的问题。上面可能有额外的日志输出。
2021-07-06T05:33:29.366753+00:00 应用程序[web.1]:
2021-07-06T05:33:29.370697+00:00 app[web.1]: npm ERR!可以在以下位置找到此运行的完整日志:
2021-07-06T05:33:29.370868+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-07-06T05_33_29_358Z-debug.log
2021-07-06T05:33:29.443928+00:00 heroku[web.1]:进程退出状态为 1
2021-07-06T05:33:29.564352+00:00 heroku[web.1]:状态从开始变为崩溃
server/package.json
{
"name": "blog-mern",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"start": "node server.js",
"server": "nodemon server.js",
"client": "cd client && npm run start",
"server-install": "npm install",
"client-install": "cd client && npm install",
"install-all": "concurrently \"npm run server-install\" \"npm run client-install\"",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"heroku-postbuild": "cd client && npm install && npm run build"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.0.1",
"concurrently": "^6.2.0",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"gitignore": "^0.6.0",
"mongoose": "^5.12.14",
"multer": "^1.4.2",
"nodemon": "^2.0.7",
"path": "^0.12.7"
}
}
客户端/package.json
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"axios": "^0.21.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"proxy": "http://localhost:5000/api/"
}
文件夹结构:
Blog-mern
客户文件夹
添加服务器文件夹