Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM install fails with Node v13 #95

Closed
kylebarron opened this issue Nov 22, 2019 · 1 comment
Closed

NPM install fails with Node v13 #95

kylebarron opened this issue Nov 22, 2019 · 1 comment

Comments

@kylebarron
Copy link

npm install -g mbview failed for me using node v13.1.0. However, I switched to node v12.13.1 using nvm, and the install worked fine. You can close this issue if you wish, though I'm guessing the error could pop up with future LTS versions of node.


> npm --version
6.12.1
> node -v
v13.1.0

It looks like it's coming from a TypeError here:

  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1527, in _GetXcodeEnv
    if XcodeVersion() >= '0500' and not env.get('SDKROOT'):
TypeError: '>=' not supported between instances of 'tuple' and 'str'

Full traceback

> npm install -g mbview
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/sqlite3/v4.1.0/node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.1.0 and node@13.1.0 (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
Traceback (most recent call last):
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
    sys.exit(gyp.script_main())
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
    return main(sys.argv[1:])
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
    return gyp_main(args)
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 532, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2215, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 794, in Write
    extra_mac_bundle_resources, part_of_all)
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 900, in WriteActions
    env = self.GetSortedXcodeEnv()
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1885, in GetSortedXcodeEnv
    additional_settings)
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1616, in GetSortedXcodeEnv
    additional_settings)
  File "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1527, in _GetXcodeEnv
    if XcodeVersion() >= '0500' and not env.get('SDKROOT'):
TypeError: '>=' not supported between instances of 'tuple' and 'str'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
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/v13.1.0/bin/node" "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/node_modules/sqlite3/lib/binding/node-v79-darwin-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/node_modules/sqlite3/lib/binding/node-v79-darwin-x64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v79"
gyp ERR! cwd /Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/node_modules/sqlite3
gyp ERR! node -v v13.1.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/kyle/.nvm/versions/node/v13.1.0/bin/node /Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/node_modules/sqlite3/lib/binding/node-v79-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/node_modules/sqlite3/lib/binding/node-v79-darwin-x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v79' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/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:1028: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/v13.1.0/bin/node" "/Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/kyle/.nvm/versions/node/v13.1.0/lib/node_modules/mbview/node_modules/sqlite3
node-pre-gyp ERR! node -v v13.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.1.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.1.0 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-11-22T18_50_37_829Z-debug.log
@mattficke
Copy link
Contributor

@kylebarron this was an issue with vendored node-gyp code and has been fixed in subsequent versions of node: nodejs/node#30272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants