mattdesl / penplot

[DEPRECATED] see canvas-sketch
MIT License
269 stars 18 forks source link

Error: `gyp` failed with exit code: 1 #2

Closed Jeremboo closed 7 years ago

Jeremboo commented 7 years ago

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 :

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
walpolea commented 7 years ago

Same issue in 1.1.2.

node 7.1.0 npm 5.3.0

npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> fsevents@1.1.2 install /Users/walpole/DEV/genart/src/node_modules/fsevents
> node install

[fsevents] Success: "/Users/walpole/DEV/genart/src/node_modules/fsevents/lib/binding/Release/node-v51-darwin-x64/fse.node" is installed via remote

> canvas@1.6.6 install /Users/walpole/DEV/genart/src/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/walpole/.nvm/versions/node/v7.1.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 14.5.0
gyp ERR! command "/Users/walpole/.nvm/versions/node/v7.1.0/bin/node" "/Users/walpole/.nvm/versions/node/v7.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/walpole/DEV/genart/src/node_modules/canvas
gyp ERR! node -v v7.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN mapify@0.1.0 requires a peer of browserify@>=3.28.0 <=4.x but none was installed.
npm WARN genart@1.0.0 No description
npm WARN genart@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@1.6.6 (node_modules/canvas):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@1.6.6 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ penplot@1.1.2
added 640 packages in 22.419s
gentlefox commented 7 years ago

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.

Jeremboo commented 7 years ago

You are right,

After following the installation of node-canvas penplot works! Even if I have some deprecated packages and some other errors.

Thank you :)

mattdesl commented 7 years ago

I’ve fixed some issues regarding gl-vec2. You shouldn’t need globally installed browserify for this module, and it should still work even if the node-canvas install fails (it’s an optional dependency only necessary if you want to generate prints without a browser). For those with node-canvas errors, does penplot not work at all after installing?

Following the node-canvas instructions in their readme will probably help clear up those errors.

Sent from my iPhone

On Aug 14, 2017, at 9:05 AM, Jérémie Boulay notifications@github.com wrote:

You are right,

After following the installation of node-canvas penplot works! Even if I have some depreciated packages and some other errors.

Thank you :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

walpolea commented 7 years ago

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.