ascii-progress
ascii-progress copied to clipboard
install fail on node 12 because `get-cursor-position` build fail
https://github.com/bubkoo/get-cursor-position/issues/10
error stack (this does not use nan)
consider an alternate module or help to fix get-cursor-position
for temporary use @magicdawn/[email protected] & @magicdawn/[email protected]
@magicdawn - this doesn't work inside the official node docker image:
docker pull node:lts
docker run -it node:lts bash
then inside of the container
cd
mkdir t
cd t
npm init # take all defaults
export NODE_TLS_REJECT_UNAUTHORIZED=0
npm i @magicdawn/ascii-progress
Errors:
(node:171) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
> @magicdawn/[email protected] install /root/t/node_modules/@magicdawn/get-cursor-position
> node-gyp rebuild
make: Entering directory '/root/t/node_modules/@magicdawn/get-cursor-position/build'
CXX(target) Release/obj.target/pos/src/pos.o
../src/pos.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE Method(Nan::NAN_METHOD_ARGS_TYPE)':
../src/pos.cc:244:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret, row, col;
^~~
SOLINK_MODULE(target) Release/obj.target/pos.node
/usr/bin/ld: Release/obj.target/pos/src/pos.o: relocation R_X86_64_PC32 against symbol `_Z6MethodRKN3Nan20FunctionCallbackInfoIN2v85ValueEEE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
pos.target.mk:137: recipe for target 'Release/obj.target/pos.node' failed
make: *** [Release/obj.target/pos.node] Error 1
make: Leaving directory '/root/t/node_modules/@magicdawn/get-cursor-position/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.9.184-linuxkit
gyp ERR! command "/usr/local/nvm/versions/node/v12.14.1/bin/node" "/usr/local/nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/t/node_modules/@magicdawn/get-cursor-position
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @magicdawn/[email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @magicdawn/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-01-16T13_29_40_466Z-debug.log
I seems to met this error before. Maybe gcc version leads to this
Both packages are pretty old get-cursor-position
and node-progress-bars
. get-cursor-position
needs modifications in order to work with newer V8 engines like node 12 has. It works with node 10.
v2.0.0 works perfect now 👍 so closing this.