I'm new to react and i started an app using create react app.When i try to rename index.js to index.jsx, I'm getting an error saying "Module build failed: Error: ENOENT: no such file or directory, open '/home/qbuser/Desktop/onChat-final/new/chat/client/src/index.js'". What should be done? Where did I go wrong?
3 Answers
It's a bug with create-react-app dev server: it can't handle renaming of index.js to index.jsx and vice versa. Just restart your dev server
1 Comment
Rauli Rajande
This is the correct answer. Just stop the dev server and start it again. It picks up index.jsx then.
Rename it back to index.js. The file can still contain JSX.
Or run "eject"/ use WebPack, then you can customize anything.
6 Comments
jgskin
Misleading answer.
|