react or npm issue: Module not found: [CaseSensitivePathsPlugin] `...\react.js` does not match the corresponding path on disk `react`
20,766
I come across the same problem.
I replaced :
import React, {Component} from 'React'
, with :
import React, {Component} from 'react'
.
React is case-sensitive, so be careful and good luck.
Author by
The Huff
Updated on June 19, 2020Comments
-
The Huff almost 4 years
I'm getting the following errors when I execute the
npm start
command on a react project.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
I'm new to react - but from what I can tell it's a pathing issue where
npm install
adds modules into the node_modules folder, all with lowercase folder names, but the compiler resolves to folder names with mixed case paths.How do I fix this? The code is from the MongoDb Stitch PlateSpace tutorial project
Do I updated the existing code (maybe the import statements) or is it a npm or react issue?
Thanks Tim