До сих пор я использовал смесь NPM и пряжи для управления пакетами, поэтому мне нужно перейти исключительно на Yarn.В консоли появляются следующие ошибки, которые я хотел бы исправить
Шаги, которые я предпринял, чтобы узнать, где я нахожусь:
Шаг 1:
ОбновленоNodeJS до версии 11.6, использующей homebrew (я думаю, что ранее у меня была установлена не-homebrew версия, поэтому перед успешной установкой пришлось преодолеть некоторые препятствия, такие как удаление конфликтующих файлов вручную, чтобы homebrew мог установить nodejs (мой проект ReactJS успешно собирается с webpack --config webpack.prod.js
иуспешно начинает использовать webpack-dev-server --open --config webpack.dev.js
до следующего шага.) Используя GIT, я могу вернуться к этому шагу.
Шаг 2:
Я удалил свой package.json.lock
и удалил свой node_modules
Папка, а затем запустил yarn install
. Это приводит к следующим предупреждениям и ошибкам в консоли. (Все по-прежнему строится успешно, даже если эти ошибки происходят)
aronlilland:client $ yarn install
yarn install v1.12.3
[1/4] ? Resolving packages...
[2/4] ? Fetching packages...
[3/4] ? Linking dependencies...
warning " > inline-style-prefixer@3.0.3" has incorrect peer dependency "caniuse-api@^1.5.2".
warning " > material-ui-datetimepicker@1.0.7" has incorrect peer dependency "react@^16.0.0".
warning " > material-ui-datetimepicker@1.0.7" has incorrect peer dependency "react-dom@^16.0.0".
warning " > eslint-config-standard@12.0.0" has unmet peer dependency "eslint-plugin-import@>=2.13.0".
warning " > eslint-config-standard@12.0.0" has unmet peer dependency "eslint-plugin-node@>=7.0.0".
warning " > eslint-config-standard@12.0.0" has unmet peer dependency "eslint-plugin-promise@>=4.0.0".
warning " > eslint-config-standard@12.0.0" has unmet peer dependency "eslint-plugin-standard@>=4.0.0".
warning " > eslint-loader@1.7.1" has incorrect peer dependency "eslint@>=1.6.0 <4.0.0".
[4/4] ? Building fresh packages...
[1/4] ⠈ fsevents
[2/4] ⠈ node-sass
[3/4] ⠈ fsevents
warning Error running install script for optional dependency: "/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/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.34
node-pre-gyp info using node@11.6.0 | darwin | x64
node-pre-gyp info check checked for \"/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/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.1.1/fse-v1.1.1-node-v67-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v67-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v67-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.1 and node@11.6.0 (node-v67 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.1/fse-v1.1.1-node-v67-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v67-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.1 and node@11.6.0 (node-v67 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.6.1
gyp info using node@11.6.0 | darwin | x64
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@11.6.0 | darwin | x64
gyp info ok
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@11.6.0 | darwin | x64
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@11.6.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/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/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/aronlilland/.node-gyp/11.6.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/aronlilland/.node-gyp/11.6.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/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 [ '/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/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/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/aronlilland/.node-gyp/11.6.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/aronlilland/.node-gyp/11.6.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/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 ok
gyp info ok
gypgyp info it worked if it ends with ok
info it worked if it ends with ok
gyp info using node-gyp@3.6.1
gyp info using node@11.6.0 | darwin | x64
gyp info using node-gyp@3.6.1
gyp info using node@11.6.0 | 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:192:
../../../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../fsevents.cc:6:
In file included from ../../../../nan/nan.h:192:
../../../../nan/nan_maybe_43_inl.h:112:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
~~~ ^
In file included from ../fsevents.cc:6:
In file included from ../../../../nan/nan.h:198:
In file included from ../../../../nan/nan_new.h:189:
../../../../nan/nan_implementation_12_inl.h:337:28: warning: 'New' is deprecated: Use Isolate* version [-Wdeprecated-declarations]
return v8::StringObject::New(value).As<v8::StringObject>();
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8.h:5241:3: note: 'New' has been explicitly marked deprecated here
V8_DEPRECATED(\"Use Isolate* version\",
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
In file included from ../../../../nan/nan.h:198:
In file included from ../../../../nan/nan_new.h:189:
../../../../nan/nan_implementation_12_inl.h:337:28: warning: 'New' is deprecated: Use Isolate* version [-Wdeprecated-declarations]
return v8::StringObject::New(value).As<v8::StringObject>();
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8.h:5241:3: note: 'New' has been explicitly marked deprecated here
V8_DEPRECATED(\"Use Isolate* version\",
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
../../../../nan/nan.h:834:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/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:849:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/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:864:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/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:911:44: warning: 'ToString' is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Local<v8::String> string = from->ToString();
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8.h:2548:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED(\"Use maybe version\", Local<String> ToString() const);
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
../../../../nan/nan.h:921:27: warning: 'WriteUtf8' is deprecated: Use Isolate* version [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8.h:2753:3: note: 'WriteUtf8' has been explicitly marked deprecated here
V8_DEPRECATED(\"Use Isolate* version\",
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
../../../../nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:91:20: noteIn file included from ../fsevents.cc:6: expanded from macro 'NODE_DEPRECATED':
../../../../nan/nan.h:834:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
__attribute__((deprecated(message))) declarator
^
return node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/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:849:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:164:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/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:864:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:157:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/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:911:44: warning: 'ToString' is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Local<v8::String> string = from->ToString();
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8.h:2548:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED(\"Use maybe version\", Local<String> ToString() const);
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
../../../../nan/nan.h:921:27: warning: 'WriteUtf8' is deprecated: Use Isolate* version [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8.h:2753:3: note: 'WriteUtf8' has been explicitly marked deprecated here
V8_DEPRECATED(\"Use Isolate* version\",
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:6:
../../../../nan/nan.h:1473:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
return scope.Escape(node::MakeCallback(
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:171:1: note: 'MakeCallback' has been explicitly marked deprecated here
NODE_DEPRECATED(\"Use MakeCallback(..., async_context)\",
^
/Users/aronlilland/.node-gyp/11.6.0/include/node/node.h:91:20: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
7 warnings and 1 error generated.
7 warnings and 1 error generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp gypERR! stackERR! Error: `make` failed with exit code: 2
gyp build errorERR!
stack at ChildProcess.onExit (/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/lib/build.js:285:23)
gypgyp ERR!ERR! stackSystem at ChildProcess.emit (events.js:188:13)
Darwin 18.2.0
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! commandgyp \"/usr/local/Cellar/node/11.6.0/bin/node\" \"/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64\"
ERR! System Darwin 18.2.0
gyp ERR! cwd /Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v11.6.0
gypgyp ERR! node-gyp -vERR! v3.6.1
gypcommand ERR! \"/usr/local/Cellar/node/11.6.0/bin/node\" \"/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64\"
not ok
gyp ERR! cwd /Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/11.6.0/bin/node /Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:188: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.2.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/11.6.0/bin/node\" \"/Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/chokidar/node_modules/fsevents
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/11.6.0/bin/node /Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/aro[-/4] ⢀ waiting...
[2/4] ⢀ node-sass
[-/4] ⢀ waiting...
error /Users/aronlilland/Documents/dev_projects/ruby/backbone/client/node_modules/node-sass: Command failed.