【发布时间】:2018-07-04 04:03:17
【问题描述】:
在使用 webpack 时,我无法在 Azure 上发布我的应用程序。
在服务器上运行时会抛出以下错误。
ERROR in ./node_modules/react-geosuggest/module/prop-types.js
Module not found: Error: Can't resolve 'prop-types' in 'd:\a\1\s\some\project\node_modules\react-geosuggest\module'
@ ./node_modules/react-geosuggest/module/prop-types.js 7:17-38
@ ./node_modules/react-geosuggest/module/Geosuggest.js
@ multi moment react-geosuggest react-bootstrap react-overlays ./Scripts/React/Components/Oem
而且我不知道/不知道到底是什么问题。
另一方面 - 在本地 - 它正在运行/构建没有任何问题。所以我真的被困在这一点上。
这是我的依赖项(package.json)的样子:
"dependencies": {
"bootstrap": "3.3.7",
"classnames": "^2.2.5",
"moment": "^2.19.2",
"react": "15.6.1",
"react-addons-css-transition-group": "^15.6.0",
"react-addons-transition-group": "^15.6.0",
"react-dom": "15.6.1",
"react-bootstrap": "0.31.5",
"react-geosuggest": "2.7.0",
"webpack": "^3.6.0",
"pathval": "1.1.0"
}
在我使用 react-geosuggest 的另一个项目中,它正在工作/构建,没有任何抱怨。
我已经尝试使用最新版本的react & react-dom 以及添加prop-types。但还是同样的问题。
【问题讨论】:
标签: node.js reactjs typescript node-modules