Roots Discourse

Incorrect peer dependency

ansible
trellis

#1

For whatever reason, it seems webpack itself is giving me an error due to it not being a recent enough version. However, I feel like this should be irrelevant as it’s a devDependency, not a dependency for production. If this is normal, how should I properly update it without breaking it.

Can’t seem to find a similar problem that anyone else has had on discourse.

Here’s the verbose output of my deploy:


#2

Try removing your node_modules directory and running yarn && yarn build:production from your theme directory


#3

@benword Really odd thing happened when I tried what you suggested:

yarn && yarn build:production
yarn install v1.12.3
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning " > stylelint-webpack-plugin@0.10.5" has incorrect peer dependency "webpack@^1.13.2 || ^2.7.0 || ^3.11.0 || ^4.4.0".
[5/5] 📃  Building fresh packages...
[1/9] ⠂ fsevents
[2/9] ⠂ uws
[8/9] ⠂ pngquant-bin
[9/9] ⠂ node-sass
warning Error running install script for optional dependency: "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.10.0
node-pre-gyp info using node@11.5.0 | darwin | x64
node-pre-gyp info check checked for \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@11.5.0 (node-v67 ABI, unknown) (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.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@11.5.0 | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@11.5.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/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/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/josephroberts/.node-gyp/11.5.0/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/josephroberts/.node-gyp/11.5.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/josephroberts/.node-gyp/11.5.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/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

Traceback (most recent call last):
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/gyp_main.py\", line 16, in <module>
    sys.exit(gyp.script_main())
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 545, in script_main
    return main(sys.argv[1:])
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 538, in main
    return gyp_main(args)
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 2170, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 795, in Write
    self.Pchify))
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py\", line 1190, in WriteSources
    cflags = self.xcode_settings.GetCflags(configname)
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 551, in GetCflags
    archs = self.GetActiveArchs(self.configname)
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 420, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py\", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/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 (/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command \"/usr/local/Cellar/node/11.5.0/bin/node\" \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/bin/node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64\" \"--napi_version=3\" \"--node_abi_napi=napi\" \"--python=/usr/bin/python\"
gyp ERR! cwd /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents
gyp ERR! node -v v11.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/11.5.0/bin/node /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi --python=/usr/bin/python' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.0.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/11.5.0/bin/node\" \"/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/fsevents
node-pre-gyp ERR! node -v v11.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/11.5.0/bin/node /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/bin/node-g[-/9] ⡀ waiting...[2/9] ⡀ uws[-/9] ⡀ waiting...
[9/9] ⡀ node-sass
error /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass
Output:
Building: /usr/local/Cellar/node/11.5.0/bin/node /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/Cellar/node/11.5.0/bin/node',
gyp verb cli   '/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.6.2
gyp info using node@11.5.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "/usr/bin/python" in the PATH
gyp verb `which` succeeded /usr/bin/python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 11.5.0
gyp verb command install [ '11.5.0' ]
gyp verb install input version string "11.5.0"
gyp verb install installing version: 11.5.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 11.5.0
gyp verb build dir attempting to create "build" dir: /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/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/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/josephroberts/.node-gyp/11.5.0/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/josephroberts/.node-gyp/11.5.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/josephroberts/.node-gyp/11.5.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass',
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 "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
    self.Pchify))
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
    cflags = self.xcode_settings.GetCflags(configname)
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
    archs = self.GetActiveArchs(self.configname)
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/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 (/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/Cellar/node/11.5.0/bin/node" "/Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/josephroberts/localdev/scicchitanolaw.com/site/web/app/themes/shig-law-theme/node_modules/node-sass
gyp ERR! node -v v11.5.0

#4

Googling this error brings you to this: https://github.com/nodejs/node-gyp/issues/569

Have you tried any of these solutions?


unlisted #5

#6

@benword I tried all the fixes in that thread with with no luck. I’m not sure where I’m going wrong here. Does Sage now require Xcode to build? I may only have command line tools installed, Xcode takes a lot of hard-drive space.


#7

At the end of the day, I gave up trying to run Xcode command line tools without downloading the Xcode app (which I had working for a long time). I believe it may have something to do with recently updating to Mojave.

This the the solution that worked for me:

  1. Install Xcode (get it from https://developer.apple.com/xcode/) if you don’t have it yet.
  2. Accept the Terms and Conditions.
  3. Ensure Xcode app is in the /Applications directory (NOT /Users/{user}/Applications ).
  4. Point xcode-select to the Xcode app Developer directory using the following command:
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Just in case anyone else comes across this issue.


listed #8