`npm i core-js@latest` не будет установлен, потому что он не может собрать core-js@‹3.3?

Я пытаюсь восстановить сборку для старой, неподдерживаемой библиотеки, чтобы мы могли проверить в некоторых изменениях (или опубликовать форк), которые позволяют ему прекрасно работать с другой обновленной библиотекой (а именно с Bootstrap 4, но это не важно для этого вопроса).

Пробуя ванильный npm i, сначала я обнаружил некоторые места, где package.json библиотеки конфликтовал с зависимостями ее зависимостей из-за конфликтов ~ и ^ — зависимости были более снисходительны к версиям, поэтому я изменил несколько зависимостей в основном проект от ~ до ^, чтобы соответствовать. Ничего страшного.

Но потом... npm i застрял там, где казалось, что что-то строится, прежде чем в конце концов сдаться.

Последняя строка, отображаемая перед зависанием, выглядит следующим образом:

⸨                  ⸩ ⠴ reify:rxjs: timing reifyNode:node_modules/selenium-webdriver Completed in 8604ms

Затем он вызывает clang и make снова и снова в течение некоторого времени (в macOS Big Sur, и я вижу команды в строке заголовка терминала), прежде чем, наконец, снова ввести npm i и блевать повсюду.

Рвота начинается с:

npm WARN deprecated [email protected]: connect 1.x series is deprecated
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Applications/projects/angularjs-dropdown-multiselect/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js

Этот вопрос кажется, по крайней мере, похожим, так как он имеет аналогичные проблемы с node-sass, но библиотека не имеет node-sass нигде в его package.json, что предполагает, что это зависимость от зависимости, которая захватывает node-sass... поэтому я не уверен, как редактировать зависимость node-sass от того места, где я нахожусь, не догадываясь о множестве версий зависимостей.


Пытаюсь установить core-js@latest

В порядке Хорошо. Давайте попробуем установить core-js выше 3.3 и посмотрим, сможем ли мы как-то заставить это работать.

На самом деле, давайте попробуем получить последнюю версию (похоже, это 3,13 атм)...

npm i -D core-js@latest

И вот что странно:

У меня те же ошибки!

Буквально одно и то же:

npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

Хм? Для сборки core-js@latest требуется core-js@‹3.3?

Что тут происходит?


Больше регистрации!

Я попытаюсь выбрать материал, который выглядит полезным, из бревенчатой ​​стяжки после npm Err!, который я вставил выше, на случай, если он будет полезен. Чтобы было ясно, это первая попытка npm i для всего библиотека и НЕ ЯВЛЯЕТСЯ для npm install -D core-js@latest.

npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/local/bin/node',
npm ERR! gyp verb cli   '/Applications/projects/angularjs-dropdown-multiselect/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]

... затем немного аромата этого несколько раз:

npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/libsass/src/ast.cpp:2:
npm ERR! ../src/libsass/src/ast.hpp:1361:25: warning: loop variable 'numerator' of type 'const std::__1::basic_string<char>' creates a copy from type 'const std::__1::basic_string<char>' [-Wrange-loop-analysis]
npm ERR!         for (const auto numerator : numerator_units())
npm ERR!                         ^
npm ERR! ../src/libsass/src/ast.hpp:1361:14: note: use reference type 'const std::__1::basic_string<char> &' to prevent copying
npm ERR!         for (const auto numerator : numerator_units())
npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~
npm ERR!                         &
npm ERR! ../src/libsass/src/ast.hpp:1363:25: warning: loop variable 'denominator' of type 'const std::__1::basic_string<char>' creates a copy from type 'const std::__1::basic_string<char>' [-Wrange-loop-analysis]
npm ERR!         for (const auto denominator : denominator_units())
npm ERR!                         ^
npm ERR! ../src/libsass/src/ast.hpp:1363:14: note: use reference type 'const std::__1::basic_string<char> &' to prevent copying
npm ERR!         for (const auto denominator : denominator_units())
npm ERR!              ^~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!                         &
npm ERR! 2 warnings generated.

... прежде чем округлить это:

npm ERR! In file included from ../src/binding.cpp:3:
npm ERR! In file included from ../src/sass_context_wrapper.h:9:
npm ERR! In file included from ../src/custom_function_bridge.h:7:
npm ERR! ../src/callback_bridge.h:110:23: warning: 'Call' is deprecated [-Wdeprecated-declarations]
npm ERR!       this->callback->Call(argv_v8.size(), &argv_v8[0])
npm ERR!                       ^
npm ERR! ../src/binding.cpp:32:16: note: in instantiation of member function 'CallbackBridge<Sass_Value *, void *>::operator()' requested here
npm ERR!   return bridge(argv);
npm ERR!                ^
npm ERR! ../../nan/nan.h:1741:3: note: 'Call' has been explicitly marked deprecated here
npm ERR!   NAN_DEPRECATED inline v8::Local<v8::Value>
npm ERR!   ^
npm ERR! ../../nan/nan.h:106:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! # define NAN_DEPRECATED __attribute__((deprecated))
npm ERR!                                        ^
npm ERR! 6 warnings generated.
npm ERR! ../src/create_string.cpp:17:25: error: no matching constructor for initialization of 'v8::String::Utf8Value'
npm ERR!   v8::String::Utf8Value string(value);
npm ERR!                         ^      ~~~~~
npm ERR! /Users/myLogin/.node-gyp/14.15.1/include/node/v8.h:3294:5: note: candidate constructor not viable: no known conversion from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
npm ERR!     Utf8Value(const Utf8Value&) = delete;
npm ERR!     ^
npm ERR! /Users/myLogin/.node-gyp/14.15.1/include/node/v8.h:3287:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
npm ERR!     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
npm ERR!     ^
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/binding/src/create_string.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Applications/projects/angularjs-dropdown-multiselect/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Darwin 20.3.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Applications/projects/angularjs-dropdown-multiselect/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Applications/projects/angularjs-dropdown-multiselect/node_modules/node-sass
npm ERR! gyp ERR! node -v v14.15.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1

Боюсь, это выше моей зарплаты. В чем дело?


person ruffin    schedule 28.05.2021    source источник