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

V8 differences between NW.js 0.15.3 and Node.js 6.2.2 #5025

Closed
ghostoy opened this issue Jun 24, 2016 · 3 comments
Closed

V8 differences between NW.js 0.15.3 and Node.js 6.2.2 #5025

ghostoy opened this issue Jun 24, 2016 · 3 comments
Assignees

Comments

@ghostoy
Copy link
Member

ghostoy commented Jun 24, 2016

Following is the comparison of V8.h between NW.js 0.15.3 (v8 version: 5.1.281.65) and Node.js 6.2.2 (v8 version 5.0.71.52):

sample

It will cause IsUndefined() and many APIs returns bad value when used in native modules built directly with node-gyp or npm.

One example is Sqlite3. When sqlite3 is built with node-gyp directly using Node.js 6.2.2, following sample app failed to run and threw Callback expected error at db.run(), which means it requires a callback function. However it runs without problem with Node.js 6.2.2 directly.

// hack sqlite3 to find correct path of binaries built for node
delete process.versions['node-webkit'];

var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:');

db.serialize(function() {
  db.run("CREATE TABLE lorem (info TEXT)");
});

db.close();
@rogerwang rogerwang self-assigned this Jun 25, 2016
ghostoy pushed a commit to ghostoy/nw.js that referenced this issue Jun 29, 2016
Due to V8 differences (nwjs#5025), native modules built from npm or
node-gyp can't be used by NW.js 0.15.x directly. Remove the docs
about the usage of npm & node-gyp.

This reverts commit 9f2a798.
ghostoy pushed a commit to ghostoy/nw.js that referenced this issue Jun 29, 2016
Due to V8 differences (nwjs#5025), native modules built from npm or
node-gyp can't be used by NW.js 0.15.x directly. Remove the docs
about the usage of npm & node-gyp.

This reverts commit 9f2a798.
@childwho
Copy link

childwho commented Dec 3, 2016

can't run firmata.js(including serialport) perfectly in nw.js

@ghostoy
Copy link
Member Author

ghostoy commented Dec 5, 2016

@childwho You can ask questions in our mailing list https://groups.google.com/forum/#!forum/nwjs-general. And if you believe it's a bug, please submit a new issue with necessary details, including your sample app, NW.js version and OS.

@danielsokolowski
Copy link

danielsokolowski commented May 28, 2019

Is possible to refactor the code to avoid having to use the nw-gyp hack?

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