react或npm问题:未找到模块:[CaseSensitivePathsPlugin]`... \ react.js`与磁盘上的对应路径“react”不匹配

问题描述:

我在执行命令npm start时遇到以下错误反应项目。react或npm问题:未找到模块:[CaseSensitivePathsPlugin]`... react.js`与磁盘上的对应路径“react”不匹配

Failed to compile. 

Error in ./~/react-scroll-pagination/dist/index.js 
Module not found: [CaseSensitivePathsPlugin] `C:\Users\timhu\Dev\MongoDbStitch\PlateSpace\Web\node_modules\React\react.js` does not match the corresponding path on disk `react`. 

@ ./~/react-scroll-pagination/dist/index.js 3:27-43 

Error in ./~/react-scroll-pagination/dist/index.js 
Module not found: [CaseSensitivePathsPlugin] `C:\Users\timhu\Dev\MongoDbStitch\PlateSpace\Web\node_modules\jQuery\dist\jquery.js` does not match the corresponding path on disk `jquery`. 

@ ./~/react-scroll-pagination/dist/index.js 3:45-62 

我是新来的反应 - 但是从我可以告诉它是一个路径问题的地方npm install添加模块到node_modules文件夹中,全部用小写文件夹名称,但是编译器解析到文件夹大小写混合的路径名。

我该如何解决这个问题?代码是从MongoDb Stitch PlateSpace tutorial project

我更新了现有的代码(也许导入语句),或者它是一个NPM或反应的问题?

感谢 添

+0

从什么控制台是您在执行安装NPM?例如,我发现Powershell和Git bash(两个都在windows上)有所不同。 –

您可以执行NPM安装/启动了错误的文件夹内。我将删除当前目录中,并确保在运行安装:

cd /stitch-examples/helloworld/react-example/ 

然后

npm install 
npm start 
+0

这并没有回答OP的陈述问题:'从我可以告诉它是一个路径问题,其中npm install将模块添加到node_modules文件夹中,全部使用小写文件夹名称,但编译器解析为具有混合大小写路径的文件夹名称。 –