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

gluestick app won't start when run with Node v7.0.0 #322

Closed
chefnobody opened this issue Oct 27, 2016 · 13 comments
Closed

gluestick app won't start when run with Node v7.0.0 #322

chefnobody opened this issue Oct 27, 2016 · 13 comments
Assignees
Labels

Comments

@chefnobody
Copy link
Contributor

chefnobody commented Oct 27, 2016

Using:

Aarons-MacBook-Pro:gluestick aconnolly$ node -v
v7.0.0
Aarons-MacBook-Pro:gluestick aconnolly$ npm -v
3.10.8

And running npm install from a freshly forked gluestick repo results in the following errors:

Aarons-MacBook-Pro:gluestick aconnolly$ npm install

> v8-debug@0.7.7 preinstall /Users/aconnolly/workspace/gluestick/node_modules/.staging/v8-debug-c1f18b53
> node -e 'process.exit(0)'


> v8-debug@0.7.7 install /Users/aconnolly/workspace/gluestick/node_modules/v8-debug
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v51-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for v8-debug@0.7.7 and node@7.0.0 (node-v51 ABI) (falling back to source compile with node-gyp) 
  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/aconnolly/.node-gyp/7.0.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/aconnolly/.node-gyp/7.0.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/aconnolly/.node-gyp/7.0.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/aconnolly/.node-gyp/7.0.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 (/Users/aconnolly/workspace/gluestick/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/aconnolly/workspace/gluestick/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/aconnolly/workspace/gluestick/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64/debug.node" "--module_name=debug" "--module_path=/Users/aconnolly/workspace/gluestick/node_modules/v8-debug/build/debug/v0.7.7/node-v51-darwin-x64"
gyp ERR! cwd /Users/aconnolly/workspace/gluestick/node_modules/v8-debug
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 

It appears there are compatibility problems with node v7.0.0 and gluestick.

@ottoinfo
Copy link

ottoinfo commented Nov 5, 2016

@chefnobody optional workaround NVM Installation

@toddw toddw added the bug label Jan 12, 2017
@zamotany
Copy link
Contributor

From what I've investigated it looks like V8 started deprecation lifecycle (some time ago) on some functions and then removed them, but node-inspector have not incorporated this changes. The reason why it's failing is that node-inspector is calling functions that doesn't exist both in newer version of node and V8.

If we can force usage of at least version 6.3.0 of node, we can use built in inspector.

@toddw
Copy link
Contributor

toddw commented Jan 19, 2017

Thanks @zamotany!

If we can force usage of at least version 6.3.0 of node, we can use built in inspector.

I think it is reasonable to require at least version 6.3.0 for debugging using the inspector. node-inspector never really worked that great even on the best days. The built in debugger works great!

Maybe that will be done as part of #406

@zamotany
Copy link
Contributor

zamotany commented Jan 20, 2017

@toddw you mean node debugger or node --inspect that allows to debug in Chrome Dev Tools??
I need to clarify some things: you want to be able to use node debugger and connect to it via VS Code/WebStrorm/Atom or to use built in node inspector that translates Node Debug Protocol to Chrome DevTools Protocol allowing to debug in Chrome Dev Tools?

@toddw
Copy link
Contributor

toddw commented Jan 20, 2017

I was talking about 'node -- inspect'

@toddw
Copy link
Contributor

toddw commented Jan 20, 2017

To be more clear: there is a project called node-inspector which never really worked well for us but the built in version of 'node -- inspect' works great

@zamotany
Copy link
Contributor

zamotany commented Jan 20, 2017

Ok, so node --inspect work great when debugging server, but as I wrote here:
#406
I could not debug test, mainly because debugger statement's did not trigger break.
Did you successfully debug test with node --inspect??

@toddw
Copy link
Contributor

toddw commented Jan 20, 2017

I believe that is broken in generated apps but it works when debugging tests in the GlueStick repo. I'll do some research on this one and get back to you

@zamotany
Copy link
Contributor

Debugging GlueStick test with node --inspect works using mocha in node or in browser with karma?

@toddw
Copy link
Contributor

toddw commented Jan 20, 2017

I'm pretty sure it works with mocha in node. I believe you can pass it as an option to mocha directly.

@zamotany
Copy link
Contributor

OK, so I quickly tested if debugger statement work with node --inspector and they work but not in with Jest. That maybe connected to the fact that Jest test with debugger statement are required dynamically.

@toddw
Copy link
Contributor

toddw commented Jan 20, 2017

This is what I use to run tests in the GlueStick repo: npm test --- --inspect --debug-brk. Then I'll usually just type debugger on the line I want to break

@toddw
Copy link
Contributor

toddw commented Jan 24, 2017

This is likely resolved with #445

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

No branches or pull requests

4 participants