Your First Step to Resolve Gatsby Dependency Issues

Nathan B Hankes - Nov 18 '20 - - Dev Community

I just ran into an issue where my dependencies broke my Gatsby project.

I knew I hadn't done anything to break it, so I followed the steps below in order to bring my project back to life.

Follow These Steps

  1. Remove package-lock.json and/or yarn.lock
  2. Issue terminal command $ gatsby clean
  3. Remove node_modules folder
  4. Install the dependencies again with your package manager of choice, either npm or yarn.
  5. Issue terminal command $ gatsby develop

If the dependencies were the issue, your error message should now be gone.

I hope these simple steps help you as much as they have helped me!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .