【发布时间】:2019-07-15 02:01:32
【问题描述】:
大家好,我是 heroku 的新手,
如果我从 github repo 克隆并在计算机上运行 >npm install 和 >npm start 它工作正常,但在我的 heroku 应用程序上它显示错误:
无法编译 ./node_modules/bootstrap/dist/js/bootstrap.js 模块 未找到:无法解析“popper.js” '/app/node_modules/bootstrap/dist/js'
Heroku 应用程序:https://nfq-barber-shop.herokuapp.com/ Github 仓库:https://github.com/ezopas/nfq-barber-shop 我尝试运行这些命令:
npm install bootstrap -D
npm install jquery -D
npm install popper.js -D
但仍然是同样的错误。我应该怎么做?我的应用在其他计算机上运行良好(npm start)。
package.json:
{
"name": "nfq-barber-shop-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"bootstrap": "^4.3.1",
"font-awesome": "^4.7.0",
"fullcalendar": "^3.10.0",
"fullcalendar-reactwrapper-with-scheduler": "^1.1.0",
"jquery.nicescroll": "^3.7.6",
"moment": "^2.24.0",
"nav-scroll-spy": "^1.0.2",
"node-sass": "^4.11.0",
"react": "^16.8.1",
"react-dom": "^16.8.1",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-router-redux": "^4.0.8",
"react-scripts": "2.1.5",
"redux": "^4.0.1",
"sweetalert": "^2.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"jquery": "^3.3.1",
"popper.js": "^1.14.7"
}
}
【问题讨论】:
标签: node.js reactjs twitter-bootstrap heroku popper.js