Gatsby-cli module not found after updating to latest Gatsby verison
See original GitHub issueDescription
It all started after I updated Gatsby to the latest version in my project that I would receive an error saying the Gatsby-cli module could not be found (error written below) after running gatsby develop
After a lot of troubleshooting, I tried creating a new gatsby site with a fresh install of npm install -g gatsby-cli
and npm install -g gatsby
, but I was getting the same error. Even after running gatsby -v
I get the same error.
Steps to reproduce
Update to latest Gatsby
Expected result
Gatsby-cli should be installed
Actual result
C:\Users\ctsyg\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53 throw ex; ^
Error: Package exports for ‘C:\Users\ctsyg\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\clipboardy’ do not define a ‘.’ subpath at resolveExports (internal/modules/cjs/loader.js:419:17) at Function.Module._findPath (internal/modules/cjs/loader.js:492:20) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:787:27) at Function.Module._load (internal/modules/cjs/loader.js:693:27) at Module.require (internal/modules/cjs/loader.js:864:19) at require (internal/modules/cjs/helpers.js:74:18) at Object.<anonymous> (C:\Users\ctsyg\AppData\Roaming\npm\node_modules\gatsby-cli\lib\create-cli.js:24:20) at Module._compile (internal/modules/cjs/loader.js:971:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1011:10) at Module.load (internal/modules/cjs/loader.js:822:32) { code: ‘MODULE_NOT_FOUND’ }
Environment
Same as above
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:13 (2 by maintainers)
Painful. I can validate this is a node version issue. Upgraded to 13.12.0 and the problem is resolved.
installed the latest version of node (14.3.0) and apparently works.