How to fix errors in Gridsome.js?

392 Views Asked by At

I'm trying to launch a new Gridsome project for local development. I've toyed with Gridsome in the past and had a great experience, so I decided to give it another shot.

This time around; however, when I run the gridsome create command, the system creates a new Gridsome site directory as expected but returns the following error message:

First Gridsome error message after running the gridsome create command

The instructions in this error message say to enter the newly-created site directory and run gridsome develop to start local development. However, after running cd my-gridsome-site and subsequently running gridsome develop, I then receive this error:

Second Gridsome error message after entering new site directory and running the gridsome develop command

So far, I've tried running npm install --save from the site directory as well as yarn install, both to no avail. Thinking that this was possibly tied to my terminal, I switched from using the Zsh terminal to using the Bash terminal. This also did not work.

I'm at a loss here and could really use a hand.

2

There are 2 best solutions below

0
On

This seems to be an environment error. Gridsome requires Node.js (v8.3+) and recommends Yarn.

Make sure your Node.js version is v8.3+ and use only one package manager like Yarn.

to check node version: node -v

0
On

I had this same issue, but I resolved it after installing yarn and running the project with yarn instead of NPM. So you should try using yarn it will help,