(gatsby-cli): Cannot find module 'react'
See original GitHub issueTry to start tutorial with Gatsby.
Description
D:\formation>gatsby
C:\Users\jlouis.JLG.000\AppData\Roaming\npm\node_modules\gatsby\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
Error: Cannot find module 'react'
Require stack:
- C:\Users\jlouis.JLG.000\AppData\Roaming\npm\node_modules\gatsby\node_modules\gatsby-recipes\dist\index.js
- C:\Users\jlouis.JLG.000\AppData\Roaming\npm\node_modules\gatsby\node_modules\gatsby-cli\lib\recipes.js
- C:\Users\jlouis.JLG.000\AppData\Roaming\npm\node_modules\gatsby\node_modules\gatsby-cli\lib\create-cli.js
- C:\Users\jlouis.JLG.000\AppData\Roaming\npm\node_modules\gatsby\node_modules\gatsby-cli\lib\index.js
- C:\Users\jlouis.JLG.000\AppData\Roaming\npm\node_modules\gatsby\dist\bin\gatsby.js
- C:\Users\jlouis.JLG.000\AppData\Roaming\npm\node_modules\gatsby\cli.js
Steps to reproduce
Remove nodeJS from my Windows 10 computer:
- Add or Remove Programs, then remove node.
- Clean the %APPDATA%/npm and %APPDATA%/npm-cache.
Install nodejs v14.11.0 with all defaulted options.
Then
npm i -g gatsby
gatsby
Expected result
According the doc, I see a help screen…
Actual result
…But in fact, I get an error stack trace as described above.
Environment
Run gatsby info --clipboard
in your project directory and paste the output here.
Sorry I cannot, I get the error stacktrace.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Gatsby - cannot find module react - Stack Overflow
but I am getting this while I want to create a new project. I am getting this error even with this command: gatsby....
Read more >Error: Cannot find module 'react' - after installing Plugin · Issue ...
here is got the error: ERROR There was a problem loading the local develop command. Gatsby may not be installed. Perhaps you need...
Read more >Error: Cannot find module "react" in Gatsby - Scott McCulloch
This issue occured after I added a new plugin to handle gatsby redirects. The issue appears because of conflicting versions of React and...
Read more >Gatsby, fix the "cannot find module gatsby-cli/lib/reporter" error
I created a site using Gatsby and I ran gatsby develop to start a local server. After a few searches across GitHub and...
Read more >Error: Cannot find module 'gatsby-plugin-utils/polyfill-remote-file'
Error : Cannot find module 'gatsby-plugin-utils/polyfill-remote-file' · $ NODE_OPTIONS= · /Users/esausilva/Development/Projects/andreasilva-design/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a workaround until fix gets merged and published - please do
npm install -g gatsby-cli@2.12.97
to use 1 version before the problemThanks for the QuickFix. Is it possible to add CIT to the pipeline to be sure that the release still working ?