2017-10-20 2213 views
1

我在執行命令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上)有所不同。 –

回答

0

您可以執行NPM安裝/啓動了錯誤的文件夾內。我將刪除當前目錄中,並確保在運行安裝:

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

然後

npm install 
npm start 
+0

這並沒有回答OP的陳述問題:'從我可以告訴它是一個路徑問題,其中npm install將模塊添加到node_modules文件夾中,全部使用小寫文件夾名稱,但編譯器解析爲具有混合大小寫路徑的文件夾名稱。 –

相關問題