TL;DR;
依存が古いので、yarn upgrade
で更新しろ。
症状
久々にメンテしようとyarnする。
yarn
yarn install v1.13.0
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
[3/5] 🚚 Fetching packages...
[4/5] 🔗 Linking dependencies...
[5/5] 🔨 Building fresh packages...
warning Error running install script for optional dependency: "/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.6.30
node-pre-gyp info using node@10.15.1 | darwin | x64
node-pre-gyp info check checked for \"/Users/akameco/src/github.com/akameco/hoge/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.0.14/fse-v1.0.14-node-v64-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download: https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.0.14 and node@10.15.1 (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http Pre-built binary not available for your system, looked for https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download: https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.0.14 and node@10.15.1 (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 node-gyp@3.8.0
gyp info using node@10.15.1 | darwin | x64
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | darwin | x64
gyp info ok
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | darwin | x64
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | darwin | x64
gypgyp infoinfo spawn /usr/bin/python
spawn /usr/bin/python
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gypgyp infoinfo spawn argsspawn args 'binding.gyp',
[ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gypgyp infoinfo spawn argsspawn args '-f',
'binding.gyp',
gypgyp infoinfo spawn argsspawn args 'make',
gyp '-f',
infogyp spawn argsinfo '-I',
gypspawn args 'make',
infogyp spawn args '/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/build/config.gypi',
infogyp spawn argsinfo '-I',
gypspawn args '-I',
infogyp spawn argsinfo '/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/build/config.gypi',
gypspawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
infogyp spawn argsinfo '-I',
spawn args '-I',
gypgyp infoinfo spawn argsspawn args '/Users/akameco/.node-gyp/10.15.1/include/node/common.gypi',
'/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gypgyp info infospawn args '-Dlibrary=shared_library',
spawn argsgyp '-I',
gypinfo infospawn args '-Dvisibility=default',
spawn argsgyp '/Users/akameco/.node-gyp/10.15.1/include/node/common.gypi',
gypinfo infospawn args '-Dnode_root_dir=/Users/akameco/.node-gyp/10.15.1',
spawn argsgyp '-Dlibrary=shared_library',
gypinfo infospawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
spawn argsgyp '-Dvisibility=default',
gypinfo infospawn args '-Dnode_lib_file=/Users/akameco/.node-gyp/10.15.1/<(target_arch)/node.lib',
spawn argsgyp '-Dnode_root_dir=/Users/akameco/.node-gyp/10.15.1',
gypinfo infospawn args '-Dmodule_root_dir=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents',
spawn argsgyp '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gypinfo infospawn args '-Dnode_engine=v8',
spawn argsgyp '-Dnode_lib_file=/Users/akameco/.node-gyp/10.15.1/<(target_arch)/node.lib',
gypinfo infospawn args '--depth=.',
spawn argsgyp '-Dmodule_root_dir=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents',
gypinfo infospawn args '--no-parallel',
spawn argsgyp '-Dnode_engine=v8',
gypinfo infospawn args '--generator-output',
spawn argsgyp '--depth=.',
gypinfo infospawn args 'build',
spawn argsgyp '--no-parallel',
gypinfo infospawn args '-Goutput_dir=.' ]
spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | darwin | x64
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.15.1 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:190:
../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:190:
../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
~~~ ^
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../fsevents.cc:6:
../../nan/nan.h:816:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
In file included from return node::MakeCallback(
../fsevents.cc:6 ^
:
../../nan/nan.h:816:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:176:1: note: 'MakeCallback' has been explicitly marked deprecated here
return node::MakeCallback(
^
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^/Users/akameco/.node-gyp/10.15.1/include/node/node.h:
176:1: note/Users/akameco/.node-gyp/10.15.1/include/node/node.h: :'MakeCallback' has been explicitly marked deprecated here91:
20: note: expanded from macro 'NODE_DEPRECATED'
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/akameco/.node-gyp/10.15.1/include/node/node.h: __attribute__((deprecated(message))) declarator
^
91:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:830:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:169:In file included from ../fsevents.cc1: note: :'MakeCallback' has been explicitly marked deprecated here6:
../../nan/nan.h:830:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
return node::MakeCallback(/Users/akameco/.node-gyp/10.15.1/include/node/node.h
: ^91
:20: /Users/akameco/.node-gyp/10.15.1/include/node/node.hnote:: 169expanded from macro 'NODE_DEPRECATED':
1: note: 'MakeCallback' has been explicitly marked deprecated here
__attribute__((deprecated(message))) declarator
^
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:91:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:844:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:162:1:In file included from ../fsevents.cc note: :'MakeCallback' has been explicitly marked deprecated here
6:
../../nan/nan.h:844:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/akameco/.node-gyp/10.15.1/include/node/node.h: return node::MakeCallback(91
^:
20: note/Users/akameco/.node-gyp/10.15.1/include/node/node.h: :expanded from macro 'NODE_DEPRECATED'162:
1: note: 'MakeCallback' has been explicitly marked deprecated here
__attribute__((deprecated(message))) declarator
^
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:91:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1447:31: warningIn file included from : ../fsevents.cc'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
:6:
../../nan/nan.h:1447:31: return scope.Escape(node::MakeCallback(
warning ^:
'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:176:1: note: 'MakeCallback' has been explicitly marked deprecated here
return scope.Escape(node::MakeCallback(
^
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:176NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",:
1^:
note: 'MakeCallback' has been explicitly marked deprecated here
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:91:20: note: expanded from macro 'NODE_DEPRECATED'NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
__attribute__((deprecated(message))) declarator
/Users/akameco/.node-gyp/10.15.1/include/node/node.h:91:20 ^
: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
4 warnings and 1 error generated.
4 warnings and 1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1make:
*** [Release/obj.target/fse/fsevents.o] Error 1
gypgyp ERR!ERR! build errorbuild error
gypgyp ERR!ERR! stackstack Error: `make` failed with exit code: 2
Error: `make` failed with exit code: 2
gypgyp ERR!ERR! stackstack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gypgyp ERR!ERR! stackstack at ChildProcess.emit (events.js:189:13)
at ChildProcess.emit (events.js:189:13)
gypgyp ERR!ERR! stackstack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp gypERR! ERR!System Darwin 18.2.0
System Darwin 18.2.0
gyp gypERR! commandERR! \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64\"
commandgyp \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64\"
ERR! gypcwd /Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents
ERR! gypcwd ERR! /Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents
node -vgyp v10.15.1
ERR!gyp node -vERR! v10.15.1
node-gyp -vgyp v3.8.0
ERR!gyp node-gyp -vERR! v3.8.0
not okgyp
ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/akameco/src/github.com/akameco/hoge/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:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command \"/usr/local/bin/node\" \"/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/akameco/src/github.com/akameco/hoge/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64' (1)"
落ちる。
yarnにissueが立っていたが、どうやらfseventsが今のnodeのバージョンと合っていないという話。
yarnの問題ではない。
yarn fails to install fsevents while npm succeeds · Issue #5962 · yarnpkg/yarn
同じ現象がIssueに上がってるみたいですね。https://t.co/xQH43ZqmYw
— kaoru (@wutda_uck) February 9, 2019
解決方法としては単純で、依存を更新すること。
yarn upgrade
バージョンの更新には痛みを伴うが、「メンテをしないお前が悪い」のでバージョンは更新しよう。
それか、Node自体のバージョンを下げるとよい。