napajs
napajs copied to clipboard
NPM Module 'java' cannot be loaded
Hi, on some reason, I am using the npm module java. But the following code just complains errors:
const napa = require('napajs');
const zone = napa.zone.create('unique_zone');
zone.execute(() => {
const java = require('java');
}, [])
.then(result => {
console.log('succeeded: ' + JSON.stringify(result.value));
})
.catch(error => {
console.log('failed: ' + error);
});
the error message:
WARN napajs binding Thanks for using Napa.js.
WARN napajs binding There is a compatibility issue on Node v8.5.0 and above.
WARN napajs binding The flag "--noincremental-marking" is set to disable V8 incremental marking as a workaround.
WARN napajs binding We are working with Node.js team on a fix in newer Node versions.
failed: SyntaxError: Invalid or unexpected token
BTW, java is a C++ addon module, and my node version is 9.4.0
use the latest lts build