question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React 16.2.0 produces Module not found error

See original GitHub issue

This works fine:

"react": "16.1.1",
"react-dom": "16.1.1",

yarn run v1.3.2
$ react-static start

=> Copying public directory...
=> [✓] Public directory copied: 97.243ms
=> Building Routes...
=> [✓] Routes Built: 4.951ms
=> Building App Bundle...
=> [✓] Build Complete: 4968.120ms
=> [✓] App serving at http://localhost:3000

This produces “Module not found” errors:

"react": "16.2.0",
"react-dom": "16.2.0",
yarn run v1.3.2
$ react-static start

=> Copying public directory...
=> [✓] Public directory copied: 443.031ms
=> Building Routes...
=> [✓] Routes Built: 10.215ms
=> Building App Bundle...
=> [✓] App serving at http://localhost:3000
Failed to rebuild.
./node_modules/react-static/lib/index.js
Module not found: Can't resolve 'react-helmet' in 'd:\my\myProject\node_modules\react-static\lib'

./build/react-static-routes.js
Module not found: Can't resolve 'react-router-dom' in 'd:\my\myProject\build'

./node_modules/react-static/lib/index.js
Module not found: Can't resolve 'react-router-dom' in 'd:\my\myProject\node_modules\react-static\lib'

Versions:

  • Windows: 10-64
  • node: 9.2.0
  • react-static: 4.5.0

Any ideas? Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tannerlinsleycommented, Dec 21, 2017

Fixed with f96e753b6c7dd305ca476b8578dbeb34bc59236c and 457477d6d6d2db79f95c1a6f01d22cfdc0dcefbe

0reactions
tannerlinsleycommented, Dec 21, 2017

I’ve got this issue replicated on my machine now 😃 Now I’m working on a fix. I agree, this one is pretty strange… I’m not sure what is happening just yet. Let me know if you find any clues!

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot find module "react/lib/ReactComponentTreeHook ...
Changed react and react-dom to 16.2.0 in my package JSON and receiving the following error. Uncaught Error: Cannot find module "react/ ...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
When you get the “cannot find module” error, or “module not found”, it means you've not installed the package you're trying to use....
Read more >
Module not found: Can't resolve 'react-dom/unstable-native ...
The error is located in a file from react-native-web but It doesn't seem to be directly link to this project.
Read more >
React v16.0 – React Blog
By default, if an error is thrown inside a component's render or lifecycle methods, the whole component tree is unmounted from the root....
Read more >
can't resolve 'react-dom/client' - You.com | The AI Search ...
To solve the error "Module not found: Error: Can't resolve 'react-dom'", make sure to install the react-dom package by opening your terminal in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found