-
Notifications
You must be signed in to change notification settings - Fork 199
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
Are Native modules supported. #25
Comments
I dont know node-compiler but did you nodec run with |
I was planning to scan and statically link all native modules during compile time (theoretically it is feasible since we are building from the source and could make some change to how native modules are loaded), but failed to find time to do it. I'll implement it as soon as possible. Thanks for the feedback! |
@mauron85 Native modules are starting to work on the |
Node.js Compiler v1.0.0 released! Native C++ modules are fully supported now. https://github.com/pmq20/node-compiler/releases/tag/v1.0.0 @mauron85 Could you have a try and let me know if it works for you? Thanks! |
Hey @pmq20, I just tried this out on an application I'm working on. It says it built but throws:
Seems like bcrypt wasn't built/included into the build? Is this an error or potentially something I did wrong? I have Node 8 installed on my Macbook and am using V1.0.0. |
To note I also get a number of
Could this be related? |
I tried this as well with sqlite3 with issues as well:
My index.js I'm trying to compile: console.log(process.version)
var knex = require('knex')({
dialect: 'sqlite3',
connection: {
filename: './data.db'
}
});
// Create a table
knex.schema.createTableIfNotExists('users', function(table) {
table.increments('id');
table.string('user_name');
})
// ...and another
.createTableIfNotExists('accounts', function(table) {
table.increments('id');
table.string('account_name');
table.integer('user_id').unsigned().references('users.id');
})
// Then query the table...
.then(function() {
return knex.insert({user_name: 'Tim'}).into('users');
})
// ...and using the insert id, insert into the other table.
.then(function(rows) {
return knex.table('accounts').insert({account_name: 'knex', user_id: rows[0]});
})
// Query both of the rows.
.then(function() {
return knex('users')
.join('accounts', 'users.id', 'accounts.user_id')
.select('users.user_name as user', 'accounts.account_name as account');
})
// .map over the results
.map(function(row) {
console.log(row);
})
// Finally, add a .catch handler for the promise chain
.catch(function(e) {
console.error(e);
})
.finally(() => {
return knex.destroy();
}); I'm using nvm with node8. Compiling normal packages works nicely. |
@firrae I failed to reproduce this on my local machine. See the screenshot. Could you check your build log to see if some error occurs when building |
@ptusch Do you have more message regarding this particular failure:
The error message is too much truncated for a diagnosis. |
@pmq20 Please forgive me, I think I forgot to add sqlite3 to the package.json. Well done btw! |
@pmq20 where would the cache be? I had used nodec before the latest version so that may be it. I'm digging around to see if I can find it on my own. I am on a Mac. |
@pmq20 nevermind, I see it's a command line option. Rebuild seems to have worked well. Now I just need to figure out the sequence of flags needed to include our public folder and it looks like it'll work. This is awesome. Thanks! |
Looks like I just need to sit our Public folder beside the executable and it works :D |
Closing this as native modules support has been added in v1.0.0. |
Thank you for this amazing compiler.
I tried to compile one of my project which is using microtime native module. I compiled it succesfully, but when I run binary I get following error:
So my question is. Are native modules supported?
The text was updated successfully, but these errors were encountered: