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 · 2 comments

Comments

Projects
None yet
3 participants
@ghostoy
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 added a commit to ghostoy/nw.js that referenced this issue Jun 29, 2016

Revert "[docs] native module with npm"
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 added a commit to ghostoy/nw.js that referenced this issue Jun 29, 2016

Revert "[docs] native module with npm"
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.

@rogerwang rogerwang closed this Aug 4, 2016

@childwho

This comment has been minimized.

childwho commented Dec 3, 2016

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

@ghostoy

This comment has been minimized.

Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment