gatsby: "A local install of Gatsby was not found. You should save Gatsby as a site dependency" — Issues with gatsby npm package

Version Details: Gatsby Version: 1.8.12 macOS Version: 10.12.6 (16G29) Node Version: v7.9.0

Gists: gatsby-config.js package.json gatsby-node.js

Hello!

I’ve recently tried cloning a repo of a personal website which was built using the gatsby starter for a blog with no styles.

As you’ll see below, after cloning the repo to a new machine that has gatsby globally installed, I attempted to npm install and get started working, but I received the following error:

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js'

After seeing this, I attempted to gatsby develop anyways, but encountered this error:

A local install of Gatsby was not found. You should save Gatsby as a site dependency e.g. npm install --save gatsby

Following those instructions, I input npm install --save gatsby and received the same error as before:

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js' npm ERR! enoent This is most likely not a problem with npm itself

I’ve included the full log of what appeared in my terminal below

EdBookPro:edouerd.github.com edouard$ npm install

npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env o update!
npm WARN prefer global yurnalist@0.2.1 should be installed with -g
gatsby-starter-blog-no-styles@1.0.0 /Users/edouard/Desktop/ed test/edouerd.github.com


huge ass tree of packages is here, visit this gist if you actually need to see this part: https://gist.github.com/edouerd/44e4f1ce2b9e6dfb078b1951fb2ad7ab


npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/edouard/.nvm/versions/node/v7.9.0/bin/node" "/Users/edouard/.nvm/versions/node/v7.9.0/bin/npm" "install"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! path /Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/edouard/.npm/_logs/2017-10-13T02_02_12_324Z-debug.log

EdBookPro:edouerd.github.com edouard$ gatsby develop
A local install of Gatsby was not found.
You should save Gatsby as a site dependency e.g. npm install --save gatsby

EdBookPro:edouerd.github.com edouard$ npm install --save gatsby

npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env o update!
npm WARN prefer global yurnalist@0.2.1 should be installed with -g
npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/edouard/.nvm/versions/node/v7.9.0/bin/node" "/Users/edouard/.nvm/versions/node/v7.9.0/bin/npm" "install" "--save" "gatsby"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! path /Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/edouard/Desktop/ed test/edouerd.github.com/node_modules/gatsby/bin/gatsby.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/edouard/.npm/_logs/2017-10-13T02_05_29_415Z-debug.log

EdBookPro:edouerd.github.com edouard$ gatsby develop

A local install of Gatsby was not found.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

Running into this issue this morning using yarn 1.2.1 after updating my dependencies.

@daviddeejjames no upgrade error with yarn… thank you! I should use this for now on…

Just ran into this issue as well, using yarn install instead of npm install seems to be a good workaround for now