node.js - Heroku 部署:找不到模块:'react-bootstrap'。确保已安装此软件包
问题描述
第一个 MERN 应用程序。部署到 Heroku 时遇到问题。在本地运行时一切正常。我试过卸载/重新安装 react-bootstrap。可能是什么问题呢?
这是我的 package.json:
{
"name": "mern-workout-app",
"version": "0.1.0",
"engines": {
"node": "13.8.0"
},
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"axios": "^0.19.2",
"bootstrap": "^4.4.1",
"react": "^16.13.1",
"react-bootstrap": "^1.0.0",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"styled-components": "^5.1.0"
},
"scripts": {
"start": "cd backend && npm install && node index.js",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"heroku-postbild": "cd client && npm install && npm run build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
解决方案
推荐阅读
- javascript - 如何仅保留在 javascript 中包含字母的记录?
- api - 使用 API 将问题链接到 JIRA 中“测试”类型的另一个问题
- python - 从内存开始播放波形文件,其余从磁盘播放
- google-chrome - 有没有办法阻止来自网站的 Chrome 中的 blob 请求?
- pagespeed - Google 页面速度洞察不适用于 Firebase 托管上托管的网站
- python - 滚动总和和 timedelta 类型的“没有要聚合的数字类型”错误
- excel - 我如何简化这个
- javascript - 更改渲染期间创建的反应组件的样式?
- java - Java 8 Stream API:如何处理地图中的空值
- excel - 如果单元格中的第一个字符是“-”,则更改整行颜色