JohnMcLear / draw

A real time collaborative drawing tool using nodejs, socket.io & paper.js
Apache License 2.0
482 stars 158 forks source link

Cannot find module '../build/Release/canvas' #233

Closed rugk closed 8 years ago

rugk commented 8 years ago
module.js:341
    throw err;
    ^

Error: Cannot find module '../build/Release/canvas'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/.../draw/node_modules/canvas/lib/bindings.js:2:18)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)

So when I go to node_modules/canvas and manually run npm install I got some other errors, but I managed to solve them by installing the cairo packages again.

Also running npm install canvasin the Etherdraw dir worked:

$ npm install canvas

> contextify@0.1.15 install /home/etherdraw/draw/node_modules/contextify
> node-gyp rebuild

make: Entering directory '/home/etherdraw/draw/node_modules/contextify/build'
  CXX(target) Release/obj.target/contextify/src/contextify.o
  SOLINK_MODULE(target) Release/obj.target/contextify.node
  COPY Release/contextify.node
make: Leaving directory '/home/etherdraw/draw/node_modules/contextify/build'
- buffer-crc32@0.1.1 node_modules/canvas/node_modules/buffer-crc32
- bytes@0.1.0 node_modules/canvas/node_modules/bytes
- coffee-script@1.4.0 node_modules/canvas/node_modules/coffee-script
- commander@0.6.1 node_modules/canvas/node_modules/commander
- cookie@0.0.5 node_modules/canvas/node_modules/cookie
- cookie-signature@0.0.1 node_modules/canvas/node_modules/cookie-signature
- diff@1.4.0 node_modules/canvas/node_modules/diff
- escape-string-regexp@1.0.2 node_modules/canvas/node_modules/escape-string-regexp
- formidable@1.0.11 node_modules/canvas/node_modules/formidable
- fresh@0.1.0 node_modules/canvas/node_modules/fresh
- graceful-fs@2.0.3 node_modules/canvas/node_modules/graceful-fs
- growl@1.8.1 node_modules/canvas/node_modules/growl
- inherits@2.0.1 node_modules/canvas/node_modules/inherits
- lru-cache@2.7.3 node_modules/canvas/node_modules/lru-cache
- methods@0.0.1 node_modules/canvas/node_modules/methods
- mime@1.2.6 node_modules/canvas/node_modules/mime
- minimist@0.0.8 node_modules/canvas/node_modules/minimist
- mkdirp@0.3.3 node_modules/canvas/node_modules/mkdirp
- jade@0.28.1 node_modules/canvas/node_modules/jade
- commander@2.3.0 node_modules/canvas/node_modules/mocha/node_modules/commander
- commander@0.6.1 node_modules/canvas/node_modules/mocha/node_modules/jade/node_modules/commander
- mkdirp@0.3.0 node_modules/canvas/node_modules/mocha/node_modules/jade/node_modules/mkdirp
- jade@0.26.3 node_modules/canvas/node_modules/mocha/node_modules/jade
- mkdirp@0.5.1 node_modules/canvas/node_modules/mocha/node_modules/mkdirp
- ms@0.7.1 node_modules/canvas/node_modules/ms
- debug@2.2.0 node_modules/canvas/node_modules/debug
- nan@1.5.3 node_modules/canvas/node_modules/nan
- pause@0.0.1 node_modules/canvas/node_modules/pause
- qs@0.5.1 node_modules/canvas/node_modules/qs
- range-parser@0.0.4 node_modules/canvas/node_modules/range-parser
- send@0.1.0 node_modules/canvas/node_modules/send
- connect@2.7.2 node_modules/canvas/node_modules/connect
- express@3.0.6 node_modules/canvas/node_modules/express
- should-type@0.2.0 node_modules/canvas/node_modules/should-type
- should-format@0.3.2 node_modules/canvas/node_modules/should-format
- should-equal@0.7.2 node_modules/canvas/node_modules/should-equal
- should@8.3.1 node_modules/canvas/node_modules/should
- sigmund@1.0.1 node_modules/canvas/node_modules/sigmund
- minimatch@0.2.14 node_modules/canvas/node_modules/minimatch
- glob@3.2.3 node_modules/canvas/node_modules/glob
- supports-color@1.2.0 node_modules/canvas/node_modules/supports-color
- mocha@2.4.5 node_modules/canvas/node_modules/mocha
etherdraw@0.1.2 /home/etherdraw/draw
├── contextify@0.1.15 
└── gyp@0.5.0  extraneous

npm WARN etherdraw@0.1.2 No license field.

However now I get this when running npm install in the canvas dir:

make[1]: Entering directory '/.../draw/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/Canvas.o
In file included from ../node_modules/nan/nan_new.h:181:0,
                 from ../node_modules/nan/nan.h:74,
                 from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBase<v8::Signature>::return_t NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../node_modules/nan/nan_implementation_12_inl.h:172:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
   return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
                                                                            ^
../node_modules/nan/nan_implementation_12_inl.h:172:76: note: candidate is:
In file included from ../src/Canvas.h:11:0,
                 from ../src/Canvas.cc:7:
/.../.node-gyp/5.11.1/include/node/v8.h:4674:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
   static Local<Signature> New(
                           ^
/.../.node-gyp/5.11.1/include/node/v8.h:4674:27: note:   candidate expects 2 arguments, 4 provided
In file included from ../src/Canvas.h:22:0,
                 from ../src/Canvas.cc:7:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:165:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../node_modules/nan/nan.h:160:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../node_modules/nan/nan.h:500:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:500:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:504:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:504:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:511:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../node_modules/nan/nan.h:511:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
/.../.node-gyp/5.11.1/include/node/node_buffer.h:34:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/.../.node-gyp/5.11.1/include/node/node_buffer.h:34:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/.../.node-gyp/5.11.1/include/node/node_buffer.h:46:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/.../.node-gyp/5.11.1/include/node/node_buffer.h:46:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/Canvas.h:22:0,
                 from ../src/Canvas.cc:7:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:515:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), size)’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                             ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:522:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:512:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
canvas.target.mk:117: recipe for target 'Release/obj.target/canvas/src/Canvas.o' failed
make[1]: *** [Release/obj.target/canvas/src/Canvas.o] Error 1
make[1]: Leaving directory '/.../draw/node_modules/canvas/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.4.111-bananian
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /.../draw/node_modules/canvas
gyp ERR! node -v v5.11.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 

npm WARN canvas@1.2.1 No license field.
npm ERR! Linux 3.4.111-bananian
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v5.11.1
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! canvas@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@1.2.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /.../draw/node_modules/canvas/npm-debug.log
Makefile:6: recipe for target 'build/Release/canvas.node' failed
make: *** [build/Release/canvas.node] Error 1

NodeJS v5 Debian 8

JohnMcLear commented 8 years ago

Try a clean install, see if you can replicate.

rugk commented 8 years ago

Just tried it and I can reproduce it:

$ bin/run.sh
Copy the settings template to settings.json...
Ensure that all dependencies are up to date...
npm WARN deprecated ueberDB@0.2.16: Package
npm WARN deprecated static-favicon@1.0.2: use serve-favicon module

> contextify@0.1.15 install /.../draw/node_modules/contextify
> node-gyp rebuild

make: Entering directory '/.../draw/node_modules/contextify/build'
  CXX(target) Release/obj.target/contextify/src/contextify.o
  SOLINK_MODULE(target) Release/obj.target/contextify.node
  COPY Release/contextify.node
make: Leaving directory '/.../draw/node_modules/contextify/build'

> canvas@1.2.1 install /.../draw/node_modules/canvas
> node-gyp rebuild

make: Entering directory '/.../draw/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/Canvas.o
In file included from ../../nan/nan_new.h:181:0,
                 from ../../nan/nan.h:74,
                 from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
../../nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBase<v8::Signature>::return_t NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../../nan/nan_implementation_12_inl.h:172:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
   return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
                                                                            ^
../../nan/nan_implementation_12_inl.h:172:76: note: candidate is:
In file included from ../src/Canvas.h:11:0,
                 from ../src/Canvas.cc:7:
/.../.node-gyp/5.11.1/include/node/v8.h:4674:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
   static Local<Signature> New(
                           ^
/.../.node-gyp/5.11.1/include/node/v8.h:4674:27: note:   candidate expects 2 arguments, 4 provided
In file included from ../src/Canvas.h:22:0,
                 from ../src/Canvas.cc:7:
../../nan/nan.h: At global scope:
../../nan/nan.h:165:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../../nan/nan.h:160:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../../nan/nan.h:500:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../../nan/nan.h:500:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:504:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../../nan/nan.h:504:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:511:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../../nan/nan.h:511:67: note: candidates are:
In file included from ../../nan/nan.h:25:0,
                 from ../src/Canvas.h:22,
                 from ../src/Canvas.cc:7:
/.../.node-gyp/5.11.1/include/node/node_buffer.h:34:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/.../.node-gyp/5.11.1/include/node/node_buffer.h:34:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/.../.node-gyp/5.11.1/include/node/node_buffer.h:46:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/.../.node-gyp/5.11.1/include/node/node_buffer.h:46:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/Canvas.h:22:0,
                 from ../src/Canvas.cc:7:
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:515:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), size)’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                             ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:522:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:512:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
canvas.target.mk:117: recipe for target 'Release/obj.target/canvas/src/Canvas.o' failed
make: *** [Release/obj.target/canvas/src/Canvas.o] Error 1
make: Leaving directory '/.../draw/node_modules/canvas/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.4.111-bananian
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /.../draw/node_modules/canvas
gyp ERR! node -v v5.11.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
etherdraw@0.1.2 /.../draw
├── async@0.6.2 
├─┬ express@3.5.3 
│ ├── buffer-crc32@0.2.1 
│ ├─┬ commander@1.3.2 
│ │ └── keypress@0.1.0 
│ ├─┬ connect@2.14.5 
│ │ ├── basic-auth-connect@1.0.0 
│ │ ├── bytes@0.3.0 
│ │ ├─┬ compression@1.0.0 
│ │ │ ├── bytes@0.2.1 
│ │ │ ├── compressible@1.0.0 
│ │ │ └── negotiator@0.3.0 
│ │ ├── connect-timeout@1.0.0 
│ │ ├─┬ cookie-parser@1.0.1 
│ │ │ └── cookie@0.1.0 
│ │ ├─┬ csurf@1.1.0 
│ │ │ ├── scmp@0.0.3 
│ │ │ └── uid2@0.0.3 
│ │ ├── errorhandler@1.0.0 
│ │ ├─┬ express-session@1.0.2 
│ │ │ ├── cookie@0.1.0 
│ │ │ ├── debug@0.7.4 
│ │ │ └── utils-merge@1.0.0 
│ │ ├── method-override@1.0.0 
│ │ ├─┬ morgan@1.0.0 
│ │ │ └── bytes@0.2.1 
│ │ ├─┬ multiparty@2.2.0 
│ │ │ └── stream-counter@0.2.0 
│ │ ├── pause@0.0.1 
│ │ ├── qs@0.6.6 
│ │ ├── raw-body@1.1.4 
│ │ ├── response-time@1.0.0 
│ │ ├─┬ serve-index@1.0.1 
│ │ │ ├── batch@0.5.0 
│ │ │ └── negotiator@0.4.2 
│ │ ├─┬ serve-static@1.1.0 
│ │ │ └── parseurl@1.0.1 
│ │ ├── setimmediate@1.0.1 
│ │ ├── static-favicon@1.0.2 
│ │ └── vhost@1.0.0 
│ ├── cookie@0.1.2 
│ ├── cookie-signature@1.0.3 
│ ├── debug@0.8.1 
│ ├── fresh@0.2.2 
│ ├── merge-descriptors@0.0.2 
│ ├── methods@0.1.0 
│ ├── mkdirp@0.4.0 
│ ├── range-parser@1.0.0 
│ └─┬ send@0.3.0 
│   ├── debug@0.8.0 
│   └── mime@1.2.11 
├── jsdom@3.1.2  extraneous
├── jsonminify@0.2.3 
├── request@2.27.0  extraneous
├─┬ socket.io@1.0.6 
│ ├── debug@0.7.4 
│ ├─┬ engine.io@1.3.1 
│ │ ├── base64id@0.1.0 
│ │ ├── debug@0.6.0 
│ │ ├─┬ engine.io-parser@1.0.6 
│ │ │ ├── after@0.8.1 
│ │ │ ├── arraybuffer.slice@0.0.6 
│ │ │ ├── base64-arraybuffer@0.1.2 
│ │ │ ├── blob@0.0.2 
│ │ │ └── utf8@2.0.0 
│ │ └─┬ ws@0.4.31 
│ │   ├── commander@0.6.1 
│ │   ├── nan@0.3.2 
│ │   ├── options@0.0.6 
│ │   └── tinycolor@0.0.1 
│ ├─┬ has-binary-data@0.1.1 
│ │ └── isarray@0.0.1 
│ ├─┬ socket.io-adapter@0.2.0 
│ │ ├── debug@0.7.4 
│ │ └── socket.io-parser@2.1.2 
│ ├─┬ socket.io-client@1.0.6 
│ │ ├── component-bind@1.0.0 
│ │ ├── component-emitter@1.1.2 
│ │ ├── debug@0.7.4 
│ │ ├─┬ engine.io-client@1.3.1 
│ │ │ ├── component-inherit@0.0.3 
│ │ │ ├── debug@0.7.4 
│ │ │ ├─┬ has-cors@1.0.3 
│ │ │ │ └── global@2.0.1 
│ │ │ ├── parsejson@0.0.1 
│ │ │ ├── parseqs@0.0.2 
│ │ │ └── xmlhttprequest@1.5.0 
│ │ ├── indexof@0.0.1 
│ │ ├── object-component@0.0.3 
│ │ ├─┬ parseuri@0.0.2 
│ │ │ └─┬ better-assert@1.0.2 
│ │ │   └── callsite@1.0.0 
│ │ └── to-array@0.1.3 
│ └─┬ socket.io-parser@2.2.0 
│   ├── debug@0.7.4 
│   ├── emitter@1.0.1 
│   └── json3@3.2.6 
└─┬ ueberDB@0.2.16 
  ├── async@0.1.15 
  ├─┬ cassandra-driver@2.0.1 
  │ ├── async@0.9.2 
  │ └── long@2.4.0 
  ├── channels@0.0.4 
  ├── dirty@0.9.9 
  ├─┬ elasticsearch@4.0.2 
  │ ├── bluebird@2.10.2 
  │ ├─┬ chalk@1.1.3 
  │ │ ├── ansi-styles@2.2.1 
  │ │ ├── escape-string-regexp@1.0.5 
  │ │ ├─┬ has-ansi@2.0.0 
  │ │ │ └── ansi-regex@2.0.0 
  │ │ ├── strip-ansi@3.0.1 
  │ │ └── supports-color@2.0.0 
  │ ├── forever-agent@0.6.1 
  │ ├── lodash@3.10.1 
  │ └── lodash-compat@3.10.2 
  ├─┬ mysql@2.6.1 
  │ ├── bignumber.js@2.0.5 
  │ ├─┬ readable-stream@1.1.14 
  │ │ ├── core-util-is@1.0.2 
  │ │ ├── inherits@2.0.1 
  │ │ └── string_decoder@0.10.31 
  │ └── require-all@1.0.0 
  ├─┬ nano@6.2.0 
  │ ├─┬ debug@2.2.0 
  │ │ └── ms@0.7.1 
  │ ├── errs@0.3.2 
  │ ├─┬ follow@0.12.1 
  │ │ ├── browser-request@0.3.3 
  │ │ ├── debug@2.2.0 
  │ │ └─┬ request@2.55.0 
  │ │   ├── aws-sign2@0.5.0 
  │ │   ├─┬ bl@0.9.5 
  │ │   │ └── readable-stream@1.0.34 
  │ │   ├── caseless@0.9.0 
  │ │   ├─┬ combined-stream@0.0.7 
  │ │   │ └── delayed-stream@0.0.5 
  │ │   ├─┬ form-data@0.2.0 
  │ │   │ └── async@0.9.2 
  │ │   ├─┬ har-validator@1.8.0 
  │ │   │ └── commander@2.9.0 
  │ │   ├── hawk@2.3.1 
  │ │   ├─┬ http-signature@0.10.1 
  │ │   │ ├── asn1@0.1.11 
  │ │   │ ├── assert-plus@0.1.5 
  │ │   │ └── ctype@0.5.3 
  │ │   ├─┬ mime-types@2.0.14 
  │ │   │ └── mime-db@1.12.0 
  │ │   ├── oauth-sign@0.6.0 
  │ │   └── qs@2.4.2 
  │ ├─┬ request@2.72.0 
  │ │ ├── aws-sign2@0.6.0 
  │ │ ├── aws4@1.4.1 
  │ │ ├─┬ bl@1.1.2 
  │ │ │ └─┬ readable-stream@2.0.6 
  │ │ │   ├── isarray@1.0.0 
  │ │ │   ├── process-nextick-args@1.0.7 
  │ │ │   └── util-deprecate@1.0.2 
  │ │ ├── caseless@0.11.0 
  │ │ ├─┬ combined-stream@1.0.5 
  │ │ │ └── delayed-stream@1.0.0 
  │ │ ├── extend@3.0.0 
  │ │ ├─┬ form-data@1.0.0-rc4 
  │ │ │ └── async@1.5.2 
  │ │ ├─┬ har-validator@2.0.6 
  │ │ │ ├─┬ commander@2.9.0 
  │ │ │ │ └── graceful-readlink@1.0.1 
  │ │ │ ├─┬ is-my-json-valid@2.13.1 
  │ │ │ │ ├── generate-function@2.0.0 
  │ │ │ │ ├─┬ generate-object-property@1.2.0 
  │ │ │ │ │ └── is-property@1.0.2 
  │ │ │ │ └── jsonpointer@2.0.0 
  │ │ │ └─┬ pinkie-promise@2.0.1 
  │ │ │   └── pinkie@2.0.4 
  │ │ ├─┬ hawk@3.1.3 
  │ │ │ ├── boom@2.10.1 
  │ │ │ ├── cryptiles@2.0.5 
  │ │ │ ├── hoek@2.16.3 
  │ │ │ └── sntp@1.0.9 
  │ │ ├─┬ http-signature@1.1.1 
  │ │ │ ├── assert-plus@0.2.0 
  │ │ │ ├─┬ jsprim@1.2.2 
  │ │ │ │ ├── extsprintf@1.0.2 
  │ │ │ │ ├── json-schema@0.2.2 
  │ │ │ │ └── verror@1.3.6 
  │ │ │ └─┬ sshpk@1.8.3 
  │ │ │   ├── asn1@0.2.3 
  │ │ │   ├── assert-plus@1.0.0 
  │ │ │   ├─┬ dashdash@1.13.1 
  │ │ │   │ └── assert-plus@1.0.0 
  │ │ │   ├── ecc-jsbn@0.1.1 
  │ │ │   ├─┬ getpass@0.1.6 
  │ │ │   │ └── assert-plus@1.0.0 
  │ │ │   ├── jodid25519@1.0.2 
  │ │ │   ├── jsbn@0.1.0 
  │ │ │   └── tweetnacl@0.13.3 
  │ │ ├── is-typedarray@1.0.0 
  │ │ ├── isstream@0.1.2 
  │ │ ├── json-stringify-safe@5.0.1 
  │ │ ├─┬ mime-types@2.1.11 
  │ │ │ └── mime-db@1.23.0 
  │ │ ├── node-uuid@1.4.7 
  │ │ ├── oauth-sign@0.8.2 
  │ │ ├── qs@6.1.0 
  │ │ ├── stringstream@0.0.5 
  │ │ ├── tough-cookie@2.2.2 
  │ │ └── tunnel-agent@0.4.3 
  │ └── underscore@1.8.3 
  ├─┬ pg@4.3.0 
  │ ├── buffer-writer@1.0.0 
  │ ├── generic-pool@2.1.1 
  │ ├── packet-reader@0.2.0 
  │ ├── pg-connection-string@0.1.3 
  │ ├─┬ pg-types@1.11.0 
  │ │ ├── ap@0.2.0 
  │ │ ├── postgres-array@1.0.0 
  │ │ ├── postgres-bytea@1.0.0 
  │ │ ├── postgres-date@1.0.1 
  │ │ └─┬ postgres-interval@1.0.2 
  │ │   └── xtend@4.0.1 
  │ ├─┬ pgpass@0.0.3 
  │ │ └─┬ split@0.3.3 
  │ │   └── through@2.3.8 
  │ └── semver@4.3.6 
  └─┬ redis@2.5.3 
    ├── double-ended-queue@2.1.0-0 
    ├── redis-commands@1.2.0 
    └── redis-parser@1.3.0 

npm ERR! Linux 3.4.111-bananian
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--loglevel" "warn"
npm ERR! node v5.11.1
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! canvas@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@1.2.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs canvas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /.../draw/npm-debug.log
start...
DirtyDB is used. This is fine for testing but not recommended for production.
module.js:341
    throw err;
    ^

Error: Cannot find module 'paper'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/.../draw/src/util/draw.js:1:75)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)

Full log: https://gist.github.com/rugk/d3801f78ef29b8ce4cffa12e5270cc07

Even npm bugs canvas fails:;

$ npm bugs canvas
npm ERR! Linux 3.4.111-bananian
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "bugs" "canvas"
npm ERR! node v5.11.1
npm ERR! npm  v3.8.6
npm ERR! path xdg-open
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn xdg-open

npm ERR! enoent spawn xdg-open ENOENT
npm ERR! enoent spawn xdg-open ENOENT
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 
rugk commented 8 years ago

So I am reporting this to the Canvas author: https://github.com/Automattic/node-canvas/issues/764

rugk commented 8 years ago

BTW when I am trying to install all the packages, which should be installed with apt-get as said in your Readme I cannot install the jpg package:

Package libjpeg8-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libjpeg62-turbo-dev

E: Package 'libjpeg8-dev' has no installation candidate

And this package is already installed: libjpeg62-turbo-dev is already the newest version

JohnMcLear commented 8 years ago

Please use search engines guys: https://github.com/Automattic/node-canvas/issues/524

JohnMcLear commented 8 years ago

We prolly need to bump the README to reflect the new package name, happy to see that as a PR

JohnMcLear commented 8 years ago

Try on Node 4 and Node 5 btw, it could be a node version related issue..

rugk commented 8 years ago

I've seen this and as I already said the new package is installed...

BTW: I'm on Node v5.

rugk commented 8 years ago

The Readme update is no problem: https://github.com/JohnMcLear/draw/pull/235

JohnMcLear commented 8 years ago

I just cloned the repo and can't replicate on node 0.12.2

JohnMcLear commented 8 years ago

node 4 fails.

jose@PBOH-SNUG:~/draw$ node -v
v4.4.4
JohnMcLear commented 8 years ago

we target an old version of canvas.

JohnMcLear commented 8 years ago

Fixed by targeting latest canvas.

rugk commented 8 years ago

Oh just a module update... :frowning:

rugk commented 8 years ago

Why not just change it to "latest"? Or do you expect things to break?


FYI I can confirm it is working now. Thanks for the fix.

I still get these "errors", but at least it works:

make: Entering directory '/home/etherdraw/draw/node_modules/canvas/build'
  SOLINK_MODULE(target) Release/obj.target/canvas-postbuild.node
  COPY Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/Canvas.o
  CXX(target) Release/obj.target/canvas/src/CanvasGradient.o
  CXX(target) Release/obj.target/canvas/src/CanvasPattern.o
  CXX(target) Release/obj.target/canvas/src/CanvasRenderingContext2d.o
  CXX(target) Release/obj.target/canvas/src/color.o
  CXX(target) Release/obj.target/canvas/src/Image.o
../src/Image.cc:667:13: warning: ‘void jpeg_mem_src(j_decompress_ptr, void*, long int)’ defined but not used [-Wunused-function]
 static void jpeg_mem_src (j_decompress_ptr cinfo, void* buffer, long nbytes) {
             ^
  CXX(target) Release/obj.target/canvas/src/ImageData.o
  CXX(target) Release/obj.target/canvas/src/init.o
  CXX(target) Release/obj.target/canvas/src/FontFace.o
  SOLINK_MODULE(target) Release/obj.target/canvas.node
  COPY Release/canvas.node

/cc @LinusU

JohnMcLear commented 8 years ago

I don't trust upstream module maintainers especially if TJ was involved

LinusU commented 8 years ago

I don't trust upstream module maintainers

Ouch :(

especially if TJ was involved

Care to elaborate?

JohnMcLear commented 8 years ago

I got fucked by upstream packages before so now we use sticky versions, this is pretty normal in apps that require stability..

TJ spat his dummy out and got a bad reputation in the Javascript world.

LinusU commented 8 years ago

this is pretty normal in apps that require stability..

True, although I would recommend using npm shrinkwrap instead since our, and most other modules, uses ^.

TJ spat his dummy out and got a bad reputation in the Javascript world.

Do you mean when he jumped the ship to go to go? But that didn't break anyones modules did it? Just curious...

Madhivarman commented 7 years ago

I am facing the similar issue..It shows webpack require..what i have to do in webpack.config.json ? ` webpackMissingModule() main.js:50783

main.js:50783 __webpack_require__() main.js:48 main.js:143250 main.js:143238 __webpack_require__() main.js:48 main.js:139738 main.js:139567 __webpack_require__() main.js:48 main.js:64966 __webpack_require__() main.js:48 main.js:64831 __webpack_require__() main.js:48 main.js:50458 __webpack_require__() main.js:48 main.js:42282 __webpack_require__() main.js:48 main.js:50583 __webpack_require__() main.js:48 main.js:110822 __webpack_require__() main.js:48 main.js:110490 __webpack_require__() main.js:48 main.js:183836 __webpack_require__() main.js:48 main.js:140 `