mapbox / mapbox/vtshaver

Install error with Node 12

Open
#38 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
44
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I ended up getting the install from NPM to work with Node 10. If you'd like, you can close this issue.

------

Error when installing from NPM:
```
> npm install @mapbox/vtshaver

> @mapbox/vtshaver@0.2.1 install /Users/kyle/tmp/node_modules/@mapbox/vtshaver
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/@mapbox/vtshaver/v0.2.1/Release/node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @mapbox/vtshaver@0.2.1 and node@12.13.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
make: *** No rule to make target `../node_modules/.bin/mason-js', needed by `mason_packages'. Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/Users/kyle/.nvm/versions/node/v12.13.1/bin/node" "/Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/kyle/tmp/node_modules/@mapbox/vtshaver/lib/binding/vtshaver.node" "--module_name=vtshaver" "--module_path=/Users/kyle/tmp/node_modules/@mapbox/vtshaver/lib/binding" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/kyle/tmp/node_modules/@mapbox/vtshaver
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v6.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/kyle/.nvm/versions/node/v12.13.1/bin/node /Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/kyle/tmp/node_modules/@mapbox/vtshaver/lib/binding/vtshaver.node --module_name=vtshaver --module_path=/Users/kyle/tmp/node_modules/@mapbox/vtshaver/lib/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/kyle/tmp/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 19.0.0
node-pre-gyp ERR! command "/Users/kyle/.nvm/versions/node/v12.13.1/bin/node" "/Users/kyle/tmp/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/kyle/tmp/node_modules/@mapbox/vtshaver
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/kyle/.nvm/versions/node/v12.13.1/bin/node /Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/kyle/tmp/node_modules/@mapbox/vtshaver/lib/binding/vtshaver.node --module_name=vtshaver --module_path=/Users/kyle/tmp/node_modules/@mapbox/vtshaver/lib/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN tmp No description
npm WARN tmp No repository field.
npm WARN tmp No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @mapbox/vtshaver@0.2.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @mapbox/vtshaver@0.2.1 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! /Users/kyle/.npm/_logs/2019-12-10T01_06_37_696Z-debug.log
```

Error when installing from git, tag v0.2.1
```
> npm install

> @mapbox/vtshaver@0.2.1 install /Users/kyle/github/mapping/vtshaver
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/@mapbox/vtshaver/v0.2.1/Release/node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @mapbox/vtshaver@0.2.1 and node@12.13.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
ACTION binding_gyp_action_before_build_target_install_deps mason_packages
info Mason Package Install Starting
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/protozero/1.6.3] Success: protozero already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/rapidjson/1.1.0] Success: rapidjson already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/geojson/0.4.2] Success: geojson already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/geometry/0.9.2] Success: geometry already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/vtzero/1.0.0] Success: vtzero already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/variant/1.1.4] Success: variant already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/gzip-hpp/0.1.0] Success: gzip-hpp already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/vector-tile/1.0.1] Success: vector-tile already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/headers/wagyu/0.4.3] Success: wagyu already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/clang++/6.0.1] Success: clang++ already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/clang-tidy/6.0.1] Success: clang-tidy already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/clang-format/6.0.1] Success: clang-format already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/llvm-cov/6.0.1] Success: llvm-cov already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/binutils/2.31] Success: binutils already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/mbgl-core/20f880e] Success: mbgl-core already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/nunicode/1.8] Success: nunicode already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/libpng/1.6.25] Success: libpng already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/sqlite/3.14.2] Success: sqlite already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/libjpeg-turbo/1.5.0] Success: libjpeg-turbo already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/webp/0.5.1] Success: webp already installed
info [/Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/icu/58.1-min-size] Success: icu already installed
info Finished downloading packages
info Completed
ACTION binding_gyp_action_before_build_target_link_deps mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/protozero/1.6.3 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/rapidjson/1.1.0 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/geojson/0.4.2 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/geometry/0.9.2 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/vtzero/1.0.0 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/variant/1.1.4 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/gzip-hpp/0.1.0 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/vector-tile/1.0.1 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/headers/wagyu/0.4.3 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/clang++/6.0.1 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/clang-tidy/6.0.1 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/clang-format/6.0.1 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/llvm-cov/6.0.1 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/binutils/2.31 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/mbgl-core/20f880e to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/nunicode/1.8 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/libpng/1.6.25 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/sqlite/3.14.2 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/libjpeg-turbo/1.5.0 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/webp/0.5.1 to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Symlinked: /Users/kyle/github/mapping/vtshaver/mason_packages/osx-x86_64/icu/58.1-min-size to /Users/kyle/github/mapping/vtshaver/mason_packages/.link
info Completed
TOUCH Release/obj.target/action_before_build.stamp
CXX(target) Release/obj.target/vtshaver/src/vtshaver.o
In file included from ../src/vtshaver.cpp:1:
In file included from ../src/filters.hpp:5:
In file included from /Users/kyle/github/mapping/vtshaver/node_modules/nan/nan.h:222:
In file included from /Users/kyle/github/mapping/vtshaver/node_modules/nan/nan_new.h:189:
/Users/kyle/github/mapping/vtshaver/node_modules/nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to
'Local'
return scope.Escape(v8::Function::New( isolate
^~~~~~~
/Users/kyle/Library/Caches/node-gyp/12.13.1/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known
conversion from 'v8::Isolate *' to 'const v8::Local &' for 1st argument
class Local {
^
/Users/kyle/Library/Caches/node-gyp/12.13.1/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known
conversion from 'v8::Isolate *' to 'v8::Local &&' for 1st argument
/Users/kyle/Library/Caches/node-gyp/12.13.1/include/node/v8.h:187:13: note: candidate template ignored: could not match 'Local' against
'v8::Isolate *'
V8_INLINE Local(Local that)
^
/Users/kyle/Library/Caches/node-gyp/12.13.1/include/node/v8.h:4171:22: note: passing argument to parameter 'context' here
Local context, FunctionCallback callback,
^
1 error generated.
make: *** [Release/obj.target/vtshaver/src/vtshaver.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/Users/kyle/.nvm/versions/node/v12.13.1/bin/node" "/Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/kyle/github/mapping/vtshaver/lib/binding/vtshaver.node" "--module_name=vtshaver" "--module_path=/Users/kyle/github/mapping/vtshaver/lib/binding" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/kyle/github/mapping/vtshaver
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v6.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/kyle/.nvm/versions/node/v12.13.1/bin/node /Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/kyle/github/mapping/vtshaver/lib/binding/vtshaver.node --module_name=vtshaver --module_path=/Users/kyle/github/mapping/vtshaver/lib/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/kyle/github/mapping/vtshaver/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 19.0.0
node-pre-gyp ERR! command "/Users/kyle/.nvm/versions/node/v12.13.1/bin/node" "/Users/kyle/github/mapping/vtshaver/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/kyle/github/mapping/vtshaver
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/kyle/.nvm/versions/node/v12.13.1/bin/node /Users/kyle/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/kyle/github/mapping/vtshaver/lib/binding/vtshaver.node --module_name=vtshaver --module_path=/Users/kyle/github/mapping/vtshaver/lib/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @mapbox/vtshaver@0.2.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @mapbox/vtshaver@0.2.1 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! /Users/kyle/.npm/_logs/2019-12-10T01_05_10_278Z-debug.log
```

Versions:

```
> node --version
v12.13.1
> npm --version
6.12.1
```
Mac 10.15.1

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported npm install with Node 12, then inspect src/vtshaver.cpp, src/filters.hpp, and the nan dependency where the native build fails. Compare the Node 10 and Node 12 installation paths; done means the package installs successfully on Node 12 without the reported build errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript, node.js
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.