JoelBesada / pasteboard

Clipboard and drag & drop image sharing web app
http://pasteboard.co
637 stars 144 forks source link

npm install error #53

Open sgohl opened 4 years ago

sgohl commented 4 years ago

npm install fails on microtime / node-gyp rebuild

docker run -it --rm node bash
root@2169a524733a:/# git clone https://github.com/JoelBesada/pasteboard.git
root@2169a524733a:/# cd pasteboard/
root@2169a524733a:/pasteboard# npm install

npm WARN deprecated ejs@0.8.0: Critical security bugs fixed in 2.5.5
npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated connect@2.7.6: connect 2.x series is deprecated
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated forEachAsync@2.2.1: Please use 'foreachasync' instead. See https://www.npmjs.com/package/foreachasync

> microtime@0.3.3 install /pasteboard/node_modules/microtime
> node-gyp rebuild

make: Entering directory '/pasteboard/node_modules/microtime/build'
  CXX(target) Release/obj.target/microtime/src/microtime.o
../src/microtime.cc:10:8: error: 'Handle' does not name a type
 static Handle<Value> Now(const Arguments &args) {
        ^~~~~~
../src/microtime.cc:23:8: error: 'Handle' does not name a type
 static Handle<Value> NowDouble(const Arguments &args) {
        ^~~~~~
../src/microtime.cc:36:8: error: 'Handle' does not name a type
 static Handle<Value> NowStruct(const Arguments &args) {
        ^~~~~~
../src/microtime.cc:54:12: error: variable or field 'init' declared void
 void init( Handle<Object> target ) {
            ^~~~~~
../src/microtime.cc:54:12: error: 'Handle' was not declared in this scope
../src/microtime.cc:54:25: error: expected primary-expression before '>' token
 void init( Handle<Object> target ) {
                         ^
../src/microtime.cc:54:27: error: 'target' was not declared in this scope
 void init( Handle<Object> target ) {
                           ^~~~~~
In file included from ../src/microtime.cc:2:0:
../src/microtime.cc:61:23: error: 'init' was not declared in this scope
 NODE_MODULE(microtime,init)
                       ^
/root/.cache/node-gyp/13.2.0/include/node/node.h:610:36: note: in definition of macro 'NODE_MODULE_X'
       (node::addon_register_func) (regfunc),                          \
                                    ^~~~~~~
../src/microtime.cc:61:1: note: in expansion of macro 'NODE_MODULE'
 NODE_MODULE(microtime,init)
 ^~~~~~~~~~~
microtime.target.mk:107: recipe for target 'Release/obj.target/microtime/src/microtime.o' failed
make: *** [Release/obj.target/microtime/src/microtime.o] Error 1
make: Leaving directory '/pasteboard/node_modules/microtime/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Linux 5.3.15-1-MANJARO
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /pasteboard/node_modules/microtime
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN notsup Unsupported engine for connect-assets@2.3.1: wanted: {"node":"0.8.x"} (current: {"node":"13.2.0","npm":"6.13.1"})
npm WARN notsup Not compatible with your version of node/npm: connect-assets@2.3.1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! microtime@0.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the microtime@0.3.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

any hints? thanks!