gatsby-style-guide-guide
gatsby-style-guide-guide copied to clipboard
Errors when running `yarn start`
After following the install instructions, I get the following when running yard start

@gobrendan I know it has to do with the GraphQL stuff because when we were building this, every time we'd add a new variable to the .md files, it would say the same thing. Removing the .cache folder and then rebuilding would usually fix it. Sometimes I'd have to do it multiple times. Must be something else. What version of Node are you running?
Actually curious with this

@gobrendan What does your package.json look like?
I'm running into a similar problem - if you think its separate, I'm happy to create a separate issue.
Here is the error I get after running the following commands:
npm install
npm start

Here's my (untouched) package.json:
{
"name": "gatsby-blog-starter-kit",
"description": "Gatsby blog starter example",
"version": "1.2.0",
"author": "Dustin Schau <[email protected]> (https://dustinschau.com)",
"repository": "https://github.com/dschau/gatsby-blog-starter-kit",
"dependencies": {
"gatsby": "~1.9.45",
"gatsby-link": "~1.6.17",
"gatsby-plugin-catch-links": "~1.0.1",
"gatsby-plugin-react-helmet": "~1.0.1",
"gatsby-plugin-react-next": "~1.0.4",
"gatsby-plugin-sharp": "~1.6.8",
"gatsby-remark-images": "~1.5.13",
"gatsby-source-filesystem": "~1.5.1",
"gatsby-transformer-remark": "~1.7.12",
"markdown-it": "^8.4.1",
"prismjs": "^1.14.0",
"react": "~16.2.0",
"react-dom": "~16.2.0",
"react-icons": "~2.2.5",
"react-prism": "^4.3.2"
},
"devDependencies": {
"classnames": "^2.2.5",
"gh-pages": "^1.1.0",
"prettier": "1.10.2",
"react-element-to-jsx-string": "^14.0.0",
"s3-deploy": "^1.0.0"
},
"keywords": [
"gatsby"
],
"license": "MIT",
"main": "n/a",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"preserve": "npm run build",
"serve": "gatsby serve",
"start": "npm run develop",
"deploy": "gatsby build --prefix-paths && gh-pages -d public"
}
}
@jpeterson Do you have a gatsby-remark-images directory within the node_modules folder?
@jpeterson Also see if yarn start works.
@frostyweather, gatsby-remark-images was indeed missing from node_modules after npm install.
I blew everything away and tried again using Yarn, but still having problems. Here's the output of yarn start.
❯ node -v
v10.4.1
❯ yarn -v
1.7.0
❯ yarn start
yarn run v1.7.0
$ npm run develop
> [email protected] develop /Users/josh6643/apps/gatsby-style-guide-guide
> gatsby develop
success delete html files from previous builds — 0.011 s
success open and validate gatsby-config.js — 0.003 s
success copy gatsby files — 0.023 s
success onPreBootstrap — 0.006 s
success source and transform nodes — 0.178 s
error Plugin gatsby-transformer-remark returned an error
Error: Cannot find module '../build/Release/sharp.node'
- loader.js:594 Function.Module._resolveFilename
internal/modules/cjs/loader.js:594:15
- loader.js:520 Function.Module._load
internal/modules/cjs/loader.js:520:25
- loader.js:650 Module.require
internal/modules/cjs/loader.js:650:17
- helpers.js:20 require
internal/modules/cjs/helpers.js:20:18
- constructor.js:8 Object.<anonymous>
[gatsby-style-guide-guide]/[sharp]/lib/constructor.js:8:15
- loader.js:702 Module._compile
internal/modules/cjs/loader.js:702:30
- loader.js:713 Object.Module._extensions..js
internal/modules/cjs/loader.js:713:10
- loader.js:612 Module.load
internal/modules/cjs/loader.js:612:32
- loader.js:551 tryModuleLoad
internal/modules/cjs/loader.js:551:12
- loader.js:543 Function.Module._load
internal/modules/cjs/loader.js:543:3
- loader.js:650 Module.require
internal/modules/cjs/loader.js:650:17
- helpers.js:20 require
internal/modules/cjs/helpers.js:20:18
- index.js:3 Object.<anonymous>
[gatsby-style-guide-guide]/[sharp]/lib/index.js:3:15
- loader.js:702 Module._compile
internal/modules/cjs/loader.js:702:30
- loader.js:713 Object.Module._extensions..js
internal/modules/cjs/loader.js:713:10
- loader.js:612 Module.load
internal/modules/cjs/loader.js:612:32
success building schema — 0.202 s
success createLayouts — 0.007 s
error Cannot read property 'allMarkdownRemark' of undefined
TypeError: Cannot read property 'allMarkdownRemark' of undefined
- gatsby-node.js:42 graphql.then.result
/Users/josh6643/apps/gatsby-style-guide-guide/gatsby-node.js:42:19
- util.js:16 tryCatcher
[gatsby-style-guide-guide]/[bluebird]/js/release/util.js:16:23
- promise.js:512 Promise._settlePromiseFromHandler
[gatsby-style-guide-guide]/[bluebird]/js/release/promise.js:512:31
- promise.js:569 Promise._settlePromise
[gatsby-style-guide-guide]/[bluebird]/js/release/promise.js:569:18
- promise.js:606 Promise._settlePromiseCtx
[gatsby-style-guide-guide]/[bluebird]/js/release/promise.js:606:10
- async.js:138 Async._drainQueue
[gatsby-style-guide-guide]/[bluebird]/js/release/async.js:138:12
- async.js:143 Async._drainQueues
[gatsby-style-guide-guide]/[bluebird]/js/release/async.js:143:10
- async.js:17 Immediate.Async.drainQueues [as _onImmediate]
[gatsby-style-guide-guide]/[bluebird]/js/release/async.js:17:14
error UNHANDLED REJECTION
TypeError: Cannot read property 'allMarkdownRemark' of undefined
- gatsby-node.js:42 graphql.then.result
/Users/josh6643/apps/gatsby-style-guide-guide/gatsby-node.js:42:19
- util.js:16 tryCatcher
[gatsby-style-guide-guide]/[bluebird]/js/release/util.js:16:23
- promise.js:512 Promise._settlePromiseFromHandler
[gatsby-style-guide-guide]/[bluebird]/js/release/promise.js:512:31
- promise.js:569 Promise._settlePromise
[gatsby-style-guide-guide]/[bluebird]/js/release/promise.js:569:18
- promise.js:606 Promise._settlePromiseCtx
[gatsby-style-guide-guide]/[bluebird]/js/release/promise.js:606:10
- async.js:138 Async._drainQueue
[gatsby-style-guide-guide]/[bluebird]/js/release/async.js:138:12
- async.js:143 Async._drainQueues
[gatsby-style-guide-guide]/[bluebird]/js/release/async.js:143:10
- async.js:17 Immediate.Async.drainQueues [as _onImmediate]
[gatsby-style-guide-guide]/[bluebird]/js/release/async.js:17:14
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/josh6643/.npm/_logs/2018-06-19T23_01_25_008Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
~/apps/gatsby-style-guide-guide master
@jpeterson Is gatsby-plugin-sharp in your node modules? Sorry this has been a process
@frostyweather yes it is, v1.6.8.
And no worries! I know this project is super fresh.
I threw the project into a new repo in case you want to check it out... but I suspect this is an environment, so not sure how helpful that will be.
https://github.com/jpeterson/style-guide
Here's my output from running yarn to install:
Possibly interesting excerpt:
error /Users/josh6643/apps/style-guide/node_modules/sharp: Command failed.
Exit code: 1
Full output:
❯ yarn
yarn install v1.7.0
[1/4] 🔍 Resolving packages...
⠁ (node:4156) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "gatsby > [email protected]" has unmet peer dependency "caniuse-db@^1.0.30000652".
warning " > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0".
warning " > [email protected]" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0".
warning "react-icons > [email protected]" has unmet peer dependency "prop-types@*".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.5.0".
[4/4] 📃 Building fresh packages...
[1/4] ⠠ fsevents
[2/4] ⠠ uws
[-/4] ⠠ waiting...
warning Error running install script for optional dependency: "/Users/josh6643/apps/style-guide/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/josh6643/apps/style-guide/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for \"/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.2/fse-v1.1.2-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http Connection closed while downloading tarball file
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info ok
gypgyp info infoit worked if it ends with ok
it worked if it ends with ok
gyp info using [email protected]
gypgyp infoinfo usingusing [email protected]
[email protected] | darwin | x64
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/josh6643/apps/style-guide/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/josh6643/.node-gyp/10.4.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/josh6643/.node-gyp/10.4.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/josh6643/.node-gyp/10.4.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/josh6643/apps/style-guide/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/josh6643/apps/style-guide/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/josh6643/.node-gyp/10.4.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/josh6643/.node-gyp/10.4.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/josh6643/.node-gyp/10.4.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/josh6643/apps/style-guide/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Traceback (most recent call last):
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py\", line 16, in <module>
Traceback (most recent call last):
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py\", line 16, in <module>
sys.exit(gyp.script_main())
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 545, in script_main
sys.exit(gyp.script_main())
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 545, in script_main
return main(sys.argv[1:])
return main(sys.argv[1:])
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 538, in main
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 538, in main
return gyp_main(args)
return gyp_main(args)
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 523, in gyp_main
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 2170, in GenerateOutput
generator.GenerateOutput(flat_list, targets, data, params)
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 2170, in GenerateOutput
part_of_all=qualified_target in needed_targets)
part_of_all=qualified_target in needed_targets)
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 795, in Write
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 795, in Write
self.Pchify))
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 1190, in WriteSources
self.Pchify))
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 1190, in WriteSources
cflags = self.xcode_settings.GetCflags(configname)
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 551, in GetCflags
cflags = self.xcode_settings.GetCflags(configname)
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 551, in GetCflags
archs = self.GetActiveArchs(self.configname)
archs = self.GetActiveArchs(self.configname)
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 420, in GetActiveArchs
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 420, in GetActiveArchs
xcode_archs_default = GetXcodeArchsDefault()
xcode_archs_default = GetXcodeArchsDefault()
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 118, in GetXcodeArchsDefault
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 118, in GetXcodeArchsDefault
xcode_version, _ = XcodeVersion()
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 1265, in XcodeVersion
xcode_version, _ = XcodeVersion()
File \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 1265, in XcodeVersion
version = re.match(r'(\\d\\.\\d\\.?\\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
version = re.match(r'(\\d\\.\\d\\.?\\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
gypgyp ERR! ERR!configure error
configure error
gyp gypERR! stackERR! Error: `gyp` failed with exit code: 1
stackgyp Error: `gyp` failed with exit code: 1
gypERR! ERR! stackstack at ChildProcess.onCpExit (/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
at ChildProcess.onCpExit (/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp gypERR! ERR!stack at ChildProcess.emit (events.js:182:13)
gyp ERR!stack at ChildProcess.emit (events.js:182:13)
stackgyp at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! System Darwin 17.6.0
gypgyp ERR! ERR!command \"/usr/local/Cellar/node/10.4.1/bin/node\" \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64\" \"--python=/usr/bin/python\"
commandgyp \"/usr/local/Cellar/node/10.4.1/bin/node\" \"/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64\" \"--python=/usr/bin/python\"
ERR!gyp cwdERR! /Users/josh6643/apps/style-guide/node_modules/fsevents
cwd /Users/josh6643/apps/style-guide/node_modules/fsevents
gyp gypERR! ERR! node -vnode -v v10.4.1
v10.4.1
gypgyp ERR! node-gyp -v v3.6.2
ERR! gypnode-gyp -v v3.6.2
ERR! gypnot ok
ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp configure --fallback-to-build --module=/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --python=/usr/bin/python' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/josh6643/apps/style-guide/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 17.6.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/10.4.1/bin/node\" \"/Users/josh6643/apps/style-guide/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/josh6643/apps/style-guide/node_modules/fsevents
node-pre-gyp ERR! node -v v10.4.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp configure --fallback-to-build --module=/Users/josh6643/apps/style-guide/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/josh6643/apps/s[-/4] ⠂ waiting...[-/4] ⠂ waiting...
[-/4] ⠂ waiting...
error /Users/josh6643/apps/style-guide/node_modules/sharp: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/josh6643/apps/style-guide/node_modules/sharp
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/josh6643/apps/style-guide/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/josh6643/.node-gyp/10.4.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/josh6643/.node-gyp/10.4.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/josh6643/.node-gyp/10.4.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/josh6643/apps/style-guide/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Traceback (most recent call last):
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
return gyp_main(args)
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
part_of_all=qualified_target in needed_targets)
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
self.Pchify))
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
cflags = self.xcode_settings.GetCflags(configname)
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
archs = self.GetActiveArchs(self.configname)
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
xcode_archs_default = GetXcodeArchsDefault()
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
xcode_version, _ = XcodeVersion()
File "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! command "/usr/local/Cellar/node/10.4.1/bin/node" "/usr/local/Cellar/node/10.4.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/josh6643/apps/style-guide/node_modules/sharp
gyp ERR! node -v v10.4.1
gyp ERR! node-gyp -v v3.6.2
@jpeterson I was able to build your repo locally. So yeah, definitely an environmental thing. Do you have a sharp folder in your node modules?
@jpeterson If not, try installing https://www.npmjs.com/package/sharp
@frostyweather @jpeterson just had the same issue.
Recreates issue above gatsby-style-guide-guide git/master ❯ node -v = v10.3.0 ❯ npm -v = 6.1.0
Works gatsby-style-guide-guide git/master* ❯ node -v = v8.11.2 ❯ npm -v = 5.6.0
I haven't been able to figure out what is/are the offending issues though
UPDATE: Little more info. I ran yarn upgrade-interactive on the repo in v10.3.0, I selected all outdated modules to be updated, went through the process and after updating the process of yarn then yarn start works as expected.
I haven't yet pinpointed exactly which package is the culprit.
You have to remove yarn.lock file then run yarn. I had the same issue before I removed yarn.lock