napajs icon indicating copy to clipboard operation
napajs copied to clipboard

NPM Module 'java' cannot be loaded

Open connglli opened this issue 6 years ago • 1 comments

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

connglli avatar May 08 '18 11:05 connglli

use the latest lts build

VSS-Vintorez avatar Jun 17 '18 21:06 VSS-Vintorez