question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: `gyp` failed with exit code: 1

See original GitHub issue

Hi,

I would like to try your package but I encountered an configure error when I try to install him.

gyp ERR! stack Error: 'gyp' failed with exit code: 1

The cli commands work but not the projects generated. When the server is started, he doesn’t find her dependencies.

Error: Cannot find module 'gl-vec2' from '/Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/penplot/util'

I tried some things without success :

  • npm install manually into the penplot package.
  • use penplot into a local npm project and try to install the missing dependencies.
  • following this node-gyp issue #809, remove the .node-gyp/ directory.

node version

7.4.0

npm version

5.2.0

Complete stack trace :

npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM= integrity checksum failed when using sha1: wanted sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM= but got sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==. (11423 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
/Users/jboulay/.nvm/versions/node/v7.4.0/bin/penplot -> /Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/penplot/bin/index.js

> canvas@1.6.5 install /Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/penplot/node_modules/canvas
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
./util/has_lib.sh: line 31: pkg-config: command not found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/Users/jboulay/.nvm/versions/node/v7.4.0/bin/node" "/Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/penplot/node_modules/canvas
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> fsevents@1.1.2 install /Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/penplot/node_modules/fsevents
> node install

[fsevents] Success: "/Users/jboulay/.nvm/versions/node/v7.4.0/lib/node_modules/penplot/node_modules/fsevents/lib/binding/Release/node-v51-darwin-x64/fse.node" is installed via remote
npm WARN mapify@0.1.0 requires a peer of browserify@>=3.28.0 <=4.x but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@1.6.5 (node_modules/penplot/node_modules/canvas):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@1.6.5 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ penplot@1.1.1
added 641 packages in 14.443s

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gentlefoxcommented, Aug 14, 2017

By the looks of things, you’re missing the dependencies for canvas (node-canvas). Take a look at the node-canvas repo for dependency installation instructions per your OS node-canvas as the extent of what is needed can vary greatly.

Also appears you both may be missing a global install of browserify.

0reactions
walpoleacommented, Aug 15, 2017

I got the node-canvas dependencies to install, but node-canvas itself presents many errors when trying to install. However, I went from only being able to run the starter code, to now having the examples work except for the generative-paint.js example because of the missing color-converter module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install with error: `gyp` failed with exit code: 1
If this is a mac machine (OSX) here is what you can do. use terminal xcode-select --print-path. then remove installed version
Read more >
node-gyp ERR! stack Error: gyp failed with exit code: 1 #2025
Node Version: $ node -v v8.11.3 $ npm -v 6.5.0; Platform: Windows 10 Pro; Compiler: msbuild; Module: weak.
Read more >
node-gyp Error: `gyp` failed with exit code: 1 (macOS | NPM)
If you're working with npm or yarn you might get this error after updating your node, npm or yarn this is a very...
Read more >
How to fix error: `gyp` failed with exit code: 1? - Error Solutions
The gyp error code 1 means that there was a general error during the compilation process. This could be caused by a number...
Read more >
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
The error "npm ERR! gyp ERR! stack Error: make failed with exit code: 2" occurs when there's a glitch in your package-lock.json ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found