Node.js 未找到react Geosugest问题模块:错误:Can';t解决';道具类型';
我在Azure上发布应用程序时遇到了问题,因为它需要使用Node.js 未找到react Geosugest问题模块:错误:Can';t解决';道具类型';,node.js,reactjs,typescript,node-modules,Node.js,Reactjs,Typescript,Node Modules,我在Azure上发布应用程序时遇到了问题,因为它需要使用webpack。 在服务器上运行时引发以下错误 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/re
webpack
。
在服务器上运行时引发以下错误
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 geosugest
正在运行/构建,没有任何抱怨
我已经尝试使用最新版本的
react
&react-dom
以及添加道具类型
。但仍然是相同的问题。我遇到了一个类似的问题,通过将其添加到package.json中的“依赖项”部分解决了这个问题:
"prop-types": "^15.6.1"
然后重新运行:
yarn install