mattdesl / color-wander

:art: Generative artwork in node/browser based on a seeded random
http://color-wander.surge.sh/
1.62k stars 147 forks source link

Error: Cannot find module 'canvas' #1

Closed todrobbins closed 8 years ago

todrobbins commented 8 years ago

The app runs great on my machine, but when I try to render out a seed I get this error:

$ node print 681969
module.js:440
    throw err;
    ^

Error: Cannot find module 'canvas'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.Module._load (module.js:386:25)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/todrobbins/dev/color-wander/lib/createFileRenderer.js:3:14)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)

osx 10.11.4 node v6.0.0 npm v3.8.6

mattdesl commented 8 years ago

Can you try: npm i canvas --save

If the install fails you will have to read the instructions in the node-canvas repo.

todrobbins commented 8 years ago

Thanks @mattdesl! It looks like something is messed up with node-gyp rebuild. I'll look into it.

MatthewKosloski commented 8 years ago

@todrobbins Hey, I got the same error as you did. I updated my Node.js to the latest version, reinstalled the node modules, but I still get the error. Did you ever get it to work?