I'm trying to revive the build for an old, unmaintained library so that we can check in some changes (or publish a fork) that lets it play nicely with another updated library (namely Bootstrap 4, but that's not important for this question).
When trying a vanilla npm i
, well, first I got some places where the library's package.json conflicted with its dependencies' dependencies because of ~
vs ^
conflicts -- the dependencies were more lenient about versions, so I changed a few dependencies in the main project from ~
to ^
to match. No big deal.
But then... npm i
got bogged down where it looked like something was building before it eventually gave up.
The last line to display before it seems to hang is this:
⸨ ⸩ ⠴ reify:rxjs: timing reifyNode:node_modules/selenium-webdriver Completed in 8604ms
It then calls clang
and make
over and over for a while (on macOS Big Sur, and I can see the commands in the terminal's title bar), before finally re-entering npm i
and puking all over the place.
The puke starts with:
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
This question seems at least similar, as it has similar issues with node-sass
, but the library doesn't have node-sass
anywhere in the its package.json, which suggests it's a dependency of a dependency that's grabbing node-sass... so I'm not sure how to edit the node-sass dependency from where I'm at without guessing at a lot of dependency versions.
Trying to install core-js@latest
Okay, fine. Let's try to install core-js greater than 3.3 and see if we can force that to work somehow.
In fact, let's try getting the latest (looks like that's 3.13 atm)...
[NOTE: I'm not sure how I missed this initially, but it looks like the latest core-js was less than 3.3 [sic!] when I wrote this. That's... um... very very weird. Did the others depend on something in beta? Now that it's up to 3.37.1 will things work? Is this the sequel to Inception? I've since moved on from this project, but might try again, just for fun. Until then, update over.]
npm i -D core-js@latest
And here's the weird thing:
That gives me the same errors!
As in literally the same stuff:
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.
Huh? core-js@latest requires core-js@<3.3 (2.6.12?) to build?
What's going on here?
More logging!
I'm going to try to select stuff that looks useful from the log screed after the npm Err!
I pasted above, in case it's useful. To be clear, this is from the first attempt at npm i
for the entire library, and IS NOT for 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 ]
... then some flavor of this several times:
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.
... before rounding out with this:
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
I'm afraid this is above my paygrade. What's going on?