Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

master: node 7.9 / yarn 0.23.2 build error node-gyp error: too few arguments to function call, expected at least 2, have 1 #140

Closed
Falieson opened this issue Apr 20, 2017 · 7 comments

Comments

@Falieson
Copy link
Contributor

Falieson commented Apr 20, 2017

== STR
$ brew install node
$ brew install yarn
$ git clone git@github.com:jcoreio/crater.git
$ cd crater
$ yarn

== FIXED WITH
$ brew uninstall node yarn
$ brew install --force node@6
$ brew link --force node@6
$ npm i

== Fresh install of OSX 2017-April-17

~/C/P/O/F/crater ❯❯❯ npm --version                                                                                    ⏎ master
4.2.0
~/C/P/O/F/crater ❯❯❯ node --version                                                                                     master
v7.9.0
~/C/P/O/F/crater ❯❯❯ yarn --version                                                                                     master
0.23.2

== ERROR log

gyp info using node@7.9.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/yarn/0.23.2/libexec/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/Cellar/yarn/0.23.2/libexec/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/florian/.node-gyp/7.9.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/florian/.node-gyp/7.9.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/yarn/0.23.2/libexec/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.0
gyp info using node@7.9.0 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/debug/src/debug.o
../src/debug.cc:38:27: error: too few arguments to function call, expected at least 2, have 1
        v8::Debug::Call(fn);
        ~~~~~~~~~~~~~~~   ^
/Users/florian/.node-gyp/7.9.0/include/node/v8-debug.h:198:3: note: 'Call' declared here
  static MaybeLocal<Value> Call(Local<Context> context,
  ^
../src/debug.cc:46:61: error: too few arguments to function call, single argument 'isolate' was not specified
        Isolate* debug_isolate = v8::Debug::GetDebugContext()->GetIsolate();
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/florian/.node-gyp/7.9.0/include/node/v8-debug.h:248:3: note: 'GetDebugContext' declared here
  static Local<Context> GetDebugContext(Isolate* isolate);
  ^
../src/debug.cc:61:67: error: too few arguments to function call, single argument 'isolate' was not specified
        Local<Context> debug_context = v8::Debug::GetDebugContext();
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/florian/.node-gyp/7.9.0/include/node/v8-debug.h:248:3: note: 'GetDebugContext' declared here
  static Local<Context> GetDebugContext(Isolate* isolate);
  ^
../src/debug.cc:66:54: error: too few arguments to function call, single argument 'isolate' was not specified
          debug_context = v8::Debug::GetDebugContext();
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/florian/.node-gyp/7.9.0/include/node/v8-debug.h:248:3: note: 'GetDebugContext' declared here
  static Local<Context> GetDebugContext(Isolate* isolate);
  ^
4 errors generated.
make: *** [Release/obj.target/debug/src/debug.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/Cellar/yarn/0.23.2/libexec/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.5.0
gyp ERR! command "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/Cellar/yarn/0.23.2/libexec/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64/debug.node" "--module_name=debug" "--module_path=/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64"
gyp ERR! cwd /Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64/debug.node --module_name=debug --module_path=/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 16.5.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/7.9.0/bin/node" "/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug
node-pre-gyp ERR! node -v v7.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64/debug.node --module_name=debug --module_path=/Users/florian/Code/Public/Opensource/Forks/jcoreio-crater/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64' (1)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@jedwards1211
Copy link
Member

I'm confused by the part where you did brew install --force node@6, what was that for?

The situation may have changed, but last time I checked fibers wasn't compatible with node 7 yet, which means meteor users are stuck with node 6 until fibers (and possibly other libs) support node 7.

@jedwards1211
Copy link
Member

Yup, we're stuck with node 6 right now: laverdet/node-fibers#333 (comment)

@Falieson
Copy link
Contributor Author

Falieson commented Apr 21, 2017

Additionally, if someone is using the latest yarn version 0.23.2 (I don't know which other versions are affected - some time later than version 19), yarn uses node 7 and as far as I can tell can't be downgraded from brew. yarnpkg/yarn#1882
I'm running into this issue after a fresh install of osx.

Other things I've tried...

~ ❯❯❯ brew install yarn@0.19
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
exiftool                   lcdf-typetools             unzip
kibana                     libtorrent-rasterbar

Error: No available formula with the name "yarn@0.19"
==> Searching for a previously deleted formula...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.

@jedwards1211
Copy link
Member

Can you still install an old version with npm i -g?

@Falieson
Copy link
Contributor Author

So I used nvm after your suggestion and submitted a PR for using .nvmrc with the package.
Also I just figured out that yarn (v0.23.2) will use whatever version of node the environment is using and it isn't strictly associated with node7 (I thought that was weird!)

@jedwards1211
Copy link
Member

Huh, why did you think it was weird? Generally package managers are designed to be relatively independent of language runtimes. Newer versions of node tend to be released with newer versions of npm, but you can actually install whatever version of npm you want, as far as I know...

@Falieson
Copy link
Contributor Author

Falieson commented May 2, 2017

Marking that the resolution is added to the README.md, basically use nvm to manage multiple versions of node side-by-side; yarn uses whatever version of node the shell had loaded/linked

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

No branches or pull requests

2 participants