@m-allanson
I am trying to run the starter hello world project and cannot seem to get thegatsby develop to run without errors.
gatsby new hello-world https://github.com/gatsbyjs/gatsby-starter-hello-worldcd hello-worldgatsby developgatsby should start the built-in development server
Error: ./.cache/default-html.js
Module not found: Error: Can't resolve 'prop-types' in '/Volumes/WIP/_www/gatsby/hello-world/.cache'
resolve 'prop-types' in '/Volumes/WIP/_www/gatsby/hello-world/.cache'
Parsed request is a module
using description file: /Volumes/WIP/_www/gatsby/hello-world/package.json (relative path: ./.cache)
resolve as module
/Volumes/WIP/_www/gatsby/hello-world/.cache/node_modules doesn't exist or is not a directory
/Volumes/WIP/_www/gatsby/node_modules doesn't exist or is not a directory
/Volumes/WIP/_www/node_modules doesn't exist or is not a directory
/Volumes/WIP/node_modules doesn't exist or is not a directory
/Volumes/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Volumes/WIP/_www/gatsby/hello-world/node_modules
using description file: /Volumes/WIP/_www/gatsby/hello-world/package.json (relative path: ./node_modules)
using description file: /Volumes/WIP/_www/gatsby/hello-world/package.json (relative path: ./node_modules/prop-types)
no extension
/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types doesn't exist
.mjs
/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.mjs doesn't exist
.js
/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.js doesn't exist
.jsx
/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.jsx doesn't exist
.wasm
/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.wasm doesn't exist
.json
/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.json doesn't exist
as directory
/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types doesn't exist
[/Volumes/WIP/_www/gatsby/hello-world/.cache/node_modules]
[/Volumes/WIP/_www/gatsby/node_modules]
[/Volumes/WIP/_www/node_modules]
[/Volumes/WIP/node_modules]
[/Volumes/node_modules]
[/node_modules]
[/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types]
[/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.mjs]
[/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.js]
[/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.jsx]
[/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.wasm]
[/Volumes/WIP/_www/gatsby/hello-world/node_modules/prop-types.json]
@ ./.cache/default-html.js 2:0-35 24:18-27 25:18-27 26:18-27 27:21-30 28:8-17 29:22-31
@ ./.cache/develop-static-entry.js
I've also tried deleting the .cache along with node_modules and package-lock.json and re run npm install to re-install packages. Same error occurs on gatsby develop
System:
OS: OS X El Capitan 10.11.6
CPU: (8) x64 Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 6.14.3 - ~/.nvm/versions/node/v6.14.3/bin/node
npm: 3.10.10 - ~/.nvm/versions/node/v6.14.3/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 71.0.3578.98
Firefox: 64.0.2
Safari: 9.1.2
npmPackages:
gatsby: ^2.0.76 => 2.0.103
npmGlobalPackages:
gatsby-cli: 2.4.8
Hey @transf3r I'd guess this is related to using an older version of npm. It looks like you have nvm installed, so you should be able to switch to the current release of node and npm with:
nvm install node
nvm use node
Then try removing your .cache and node_modules directories and the package-lock.json file, check your npm version with npm --version and then try running npm install again.
Latest node has resolved it. Thanks
Most helpful comment
Latest node has resolved it. Thanks