'getting error when run npm start command with gatsby
When I run command npm start it's giving me error
ERROR
gatsby develop
Start development server. Watches files, rebuilds, and hot reloads if something changes
And when I run command gatsby build it's giving me this error:
gatsby can only be run for a gatsby site. Either the current working directory does not contain a valid package.json or 'gatsby' is not specified as a dependency
I tried to delete node_modules and install again but still giving me the same error. How can I fix this?
Solution 1:[1]
It seems that you are not running the commands in the proper folder.
npm start, gatsby develop or gatsby build must be triggered in the root of your Gatsby project, where the package.json is located.
Share more details about where and how are you trying to run npm start and even your project structure in order to know what's going on.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ferran Buireu |
