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 v0.10 Support #80

Closed
teburd opened this issue Sep 18, 2015 · 7 comments
Closed

Node v0.10 Support #80

teburd opened this issue Sep 18, 2015 · 7 comments

Comments

@teburd
Copy link

teburd commented Sep 18, 2015

It appears that from time v0.11.3 -> v0.11.4 the package no longer builds against Node v0.10.x

In the meantime v0.11.3 does not build against node v4.1.0

This is a bit frustrating as we're using CentOS 7 which has node v0.10 for our production boxes. We could update node on there, but that results in a bunch of bugs from other packages (we've tried it before...)

Any chance this could be fixed so that time builds against v0.10 and v4.1.0 and everything between still?

Fyi the bugs I'm speaking of are...

https://discuss.newrelic.com/t/node-js-agent-1-22-0-unexpected-identifier-error/29005
nodejs/node-v0.x-archive#9261
brianc/node-pg-copy-streams#25

Everything but time v0.11.4 works perfectly fine on Node v0.10.

@TooTallNate
Copy link
Owner

v0.11.4 works for me with Node.js v0.10.40. What's the error that you're seeing? Also I'm not sure how any of those links are relevant to node-time...

@TooTallNate
Copy link
Owner

@teburd
Copy link
Author

teburd commented Sep 18, 2015

> [email protected] install /home/tburdick/project/node_modules/time
> node-gyp rebuild

make: Entering directory `/home/tburdick/project/node_modules/time/build'
  CXX(target) Release/obj.target/time/src/time.o
In file included from ../src/time.cc:5:0:
../node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
   static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
                                               ^
make: *** [Release/obj.target/time/src/time.o] Error 1
make: Leaving directory `/home/tburdick/project/node_modules/time/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/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 4.1.0-x86_64-linode59
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/tburdick/project/node_modules/time
gyp ERR! node -v v0.10.36
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

v0.10.36 is the latest version packaged for CentOS 7

The other links are references as to why we're using v0.10 still

@TooTallNate
Copy link
Owner

Does CentOS use a shared V8 package? It's likely a different version than the one required by nan. You're better off using the official binaries, or compiling node yourself to ensure the correct version of V8 is being used. See nodejs/nan#414 for some more info.

@teburd
Copy link
Author

teburd commented Sep 18, 2015

It appears that yes, it does in fact used a shared v8 package and does some patching. Still the fact remains that it works fine with time v0.11.3 and not with v0.11.4... frustrating that minor revisions of all of these moving parts can possibly break things.

@TooTallNate
Copy link
Owner

Ya, that's my bad. I should have done a major version bump when I started using nan. I didn't think it would be a breaking change at the time though since vanilla node.js v0.10 still works. This was a kind of hard-to-catch edge case.

Either pin your node-time version to v0.11.3 in your app, or use a node distro that uses the matching V8 version. Hope that helps and sorry for the frustration.

@teburd
Copy link
Author

teburd commented Sep 18, 2015

I appreciate the help in figuring this out, hopefully this issue is helpful to anyone else that runs across this.

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

2 participants