mapbox / mapbox/node-pre-gyp

stack Error: Cannot find module 'internal/util/types'

Open
#382 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

I'm trying to install vcremote via "sudo npm install -g --unsafe-perm vcremote", and I'm getting an error that states This is a bug in node-pre-gyp. Below is the output form the command:

sudo npm install -g --unsafe-perm vcremote
npm WARN deprecated connect@2.12.0: connect 2.x series is deprecated
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated natives@1.1.3: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated node-uuid@1.4.0: Use uuid module instead
npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated sprintf@0.1.5: The sprintf package is deprecated in favor of sprintf-js.
npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated node-uuid@1.3.3: Use uuid module instead
/usr/local/bin/vcremote -> /usr/local/lib/node_modules/vcremote/bin/vcremote

thread-sleep@1.0.4 install /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep
node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/local/bin/node',
node-pre-gyp verb cli '/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli 'install',
node-pre-gyp verb cli '--fallback-to-build' ]
node-pre-gyp info using node-pre-gyp@0.6.9
node-pre-gyp info using node@8.11.2 | darwin | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/lib/binding/Release/node-v57-darwin-x64/thread_sleep.node" (not found)
node-pre-gyp http GET https://node-pre-gyp-forbeslindesay.s3.amazonaws.com/thread_sleep/v1.0.4/Release/thread_sleep-v1.0.4-node-v57-darwin-x64.tar.gz
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: Cannot find module 'internal/util/types'
node-pre-gyp ERR! stack at Function.Module._resolveFilename (module.js:547:15)
node-pre-gyp ERR! stack at Function.Module._load (module.js:474:25)
node-pre-gyp ERR! stack at Module.require (module.js:596:17)
node-pre-gyp ERR! stack at require (internal/module.js:11:18)
node-pre-gyp ERR! stack at evalmachine.:31:26
node-pre-gyp ERR! stack at Object. (/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1)
node-pre-gyp ERR! stack at Module._compile (module.js:652:30)
node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:663:10)
node-pre-gyp ERR! stack at Module.load (module.js:565:32)
node-pre-gyp ERR! stack at tryModuleLoad (module.js:505:12)
node-pre-gyp ERR! System Darwin 17.4.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep
node-pre-gyp ERR! node -v v8.11.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.9
node-pre-gyp ERR! This is a bug in node-pre-gyp.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! https://github.com/mapbox/node-pre-gyp/issues
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep@1.0.4 (node_modules/vcremote/node_modules/thread-sleep):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep@1.0.4 install: node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 7

  • vcremote@1.0.13
    updated 2 packages in 16.044s

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported global install with Node.js v8.11.2 and vcremote, then inspect the node-pre-gyp@0.6.9 dependency path through tar, fstream, and graceful-fs shown in the stack. Done means the thread-sleep install no longer ends with the uncaught "Cannot find module 'internal/util/types'" error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.