Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-pre-gyp ERR! #425

Open
invious opened this issue Oct 29, 2018 · 3 comments
Open

node-pre-gyp ERR! #425

invious opened this issue Oct 29, 2018 · 3 comments

Comments

@invious
Copy link

invious commented Oct 29, 2018

Tried to run

cd jsonapi-server
npm install

and saw these errors:

$ npm install

> v8-profiler@5.7.0 preinstall /Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler
> node -e 'process.exit(0)'


> v8-profiler@5.7.0 install /Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-profiler@5.7.0 and node@10.5.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-profiler@5.7.0 and node@10.5.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
  CXX(target) Release/obj.target/profiler/src/profiler.o
  CXX(target) Release/obj.target/profiler/src/profiler.o
In file included from In file included from ../src/profiler.cc:2:
../../nan/nan.h:839:18: warning: ../src/profiler.cc:2:
'MakeCallback'../../nan/nan.h:839:18: warning: 'MakeCallback' is deprecated: Use
      MakeCallback(..., async_context) [-Wdeprecated-declarations]
 is    return node::MakeCallback(
                 ^
 deprecated: Use
      MakeCallback(..., async_context) [-Wdeprecated-declarations]
    return node::MakeCallback(
                 ^
/Users/Aymon/.node-gyp/10.5.0/include/node/node.h:171:1: note: 'MakeCallback'
      has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
/Users/Aymon/.node-gyp/10.5.0/include/node/node.h:88:20: /Users/Aymon/.node-gyp/10.5.0/include/node/node.hnote:171:1: note: : 'MakeCallback'
      has been explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
expanded /Users/Aymon/.node-gyp/10.5.0/include/node/node.hfrom:
88      :macro20 :'NODE_DEPRECATED'
note: expanded from
      macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/profiler.cc:2:
../../nan/nan.h:854:18: warning: 'MakeCallback' is deprecated: Use
      MakeCallback(..., async_context) [-Wdeprecated-declarations]
In file included from ../src/profiler.cc:2:
../../nan/nan.h:854    return node::MakeCallback(:
18:                 ^
warning: /Users/Aymon/.node-gyp/10.5.0/include/node/node.h'MakeCallback': 164is: 1deprecated::  Use
      noteMakeCallback(...,:  async_context)'MakeCallback'
[-Wdeprecated-declarations]      has
 been explicitly marked deprecated here
    return node::MakeCallback(
                 ^
/Users/Aymon/.node-gyp/10.5.0/include/node/node.h:164:1:NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^note
: 'MakeCallback'
      has /Users/Aymon/.node-gyp/10.5.0/include/node/node.hbeen: 88explicitly: 20marked:  deprecated herenote:
expanded from
      macro 'NODE_DEPRECATED'
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
    __attribute__((deprecated(message))) declarator
/Users/Aymon/.node-gyp/10.5.0/include/node/node.h                   ^:
88:20: note: expanded from
      macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
In file included from ../src/profiler.cc:In file included from 2../src/profiler.cc:
:2../../nan/nan.h:
:869../../nan/nan.h::18869:: 18: warning: warning: 'MakeCallback' is'MakeCallback'  deprecated:is  Usedeprecated:
       UseMakeCallback(...,
       async_context)MakeCallback(...,  [-Wdeprecated-declarations]async_context)
[-Wdeprecated-declarations]
    return node::MakeCallback(
    return node::MakeCallback(
                 ^
                 ^
/Users/Aymon/.node-gyp/10.5.0/include/node/node.h/Users/Aymon/.node-gyp/10.5.0/include/node/node.h::157157::11::  notenote: : 'MakeCallback''MakeCallback'

            hashas  beenbeen  explicitlyexplicitly  markedmarked  deprecateddeprecated  herehere

NODE_DEPRECATED("Use MakeCallback(..., async_context)",NODE_DEPRECATED("Use MakeCallback(..., async_context)",

^^

/Users/Aymon/.node-gyp/10.5.0/include/node/node.h/Users/Aymon/.node-gyp/10.5.0/include/node/node.h::8888::2020::  notenote: : expandedexpanded  fromfrom

            macromacro  'NODE_DEPRECATED''NODE_DEPRECATED'

    __attribute__((deprecated(message))) declarator
                   ^
    __attribute__((deprecated(message))) declarator
                   ^
In file included from In file included from ../src/profiler.cc../src/profiler.cc::22:
:
../../nan/nan.h../../nan/nan.h::14781478:31::31 : warning: warning: 'MakeCallback' is 'MakeCallback'deprecated:  Useis
       deprecated:MakeCallback(...,  Useasync_context)
       [-Wdeprecated-declarations]MakeCallback(...,
 async_context) [-Wdeprecated-declarations]
    return scope.Escape(node::MakeCallback(
                              ^
    return scope.Escape(node::MakeCallback(
/Users/Aymon/.node-gyp/10.5.0/include/node/node.h:                              ^171
:1: note/Users/Aymon/.node-gyp/10.5.0/include/node/node.h: :171'MakeCallback':
1      :has  been noteexplicitly:  marked'MakeCallback'
deprecated       hashere been
 explicitly marked deprecated here
NODE_DEPRECATED("Use MakeCallback(..., async_context)",
^
NODE_DEPRECATED("Use MakeCallback(..., async_context)",/Users/Aymon/.node-gyp/10.5.0/include/node/node.h
:88^:
20: note/Users/Aymon/.node-gyp/10.5.0/include/node/node.h: :88expanded: 20from:
       macro note'NODE_DEPRECATED':
expanded from
      macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
    __attribute__((deprecated(message))) declarator
                   ^
4 warnings generated.
4 warnings generated.
rm: ./Release/.deps/Release/obj.target/profiler/src/profiler.o.d.raw: No such file or directory
make: *** [Release/obj.target/profiler/src/profiler.o] Error 1
gyp  CXX(target) Release/obj.target/profiler/src/cpu_profiler.o
 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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/Cellar/node/10.5.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64/profiler.node" "--module_name=profiler" "--module_path=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64"
gyp ERR! cwd /Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.5.0_1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64/profiler.node --module_name=profiler --module_path=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Aymon/Desktop/jsonapi-server/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 18.0.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.5.0_1/bin/node" "/Users/Aymon/Desktop/jsonapi-server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler
node-pre-gyp ERR! node -v v10.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.5.0_1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64/profiler.node --module_name=profiler --module_path=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64' (1)
In file included from ../src/cpu_profiler.cc:1:v8-profiler@5.7.0~install: Fai
../src/cpu_profiler.h:6:10: fatal error: 'nan.h' file not found
#include "nan.h"
         ^~~~~~~
1 error generated.
make: *** [Release/obj.target/profiler/src/cpu_profiler.o] Error 1
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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/Cellar/node/10.5.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64/profiler.node" "--module_name=profiler" "--module_path=/Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler/build/profiler/v5.7.0/node-v64-darwin-x64"
gyp ERR! cwd /Users/Aymon/Desktop/jsonapi-server/node_modules/v8-profiler
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-profiler@5.7.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-profiler@5.7.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Aymon/.npm/_logs/2018-10-29T16_11_43_727Z-debug.log
@championswimmer
Copy link
Contributor

Are you on Mac? If yes

CXX=clang++ npm install

will work

@HTeker
Copy link

HTeker commented Sep 2, 2020

@invious try using version 8 of Node.js

nvm install 8.17.0
nvm use 8.17.0

@wanaiqing
Copy link

Are you on Mac? If yes

CXX=clang++ npm install

will work

It's weird that it worked once, but not any more when I removed node_modules and repeated it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants