Reputation: 1
When running gatsby develop
, right after gatsby new
with configurations provided in the tutorial here - https://www.gatsbyjs.com/docs/tutorial/part-1/, I am getting this error
Module build failed (from ../../my-first-gatsby-sitenode_modules/gatsby/dist/utils/babel-loader.js): Error: Cannot find module '..\my-first-gatsby-site\node_modules\gatsby\dist\utils\babel-loader.js'
Solutions I have tried:
npm install
in node_modules/gatsby
.Please help if you have come across the error and been able to resolve it. TIA.
Upvotes: 0
Views: 5112
Reputation: 29320
Run
npm install
innode_modules/gatsby
.
npm install
must be run in the root of your project, not inside node_modules
.
Delete node_modules, package-lock => npm install / yarn.
You should only choose npm or yarn, not both.
Try the following:
npm install --save gatsby-cli
npm audit fix
(in the root of your project).node_modules
and reinstall the dependencies in the root of your project by: npm install
Upvotes: 3