-
Notifications
You must be signed in to change notification settings - Fork 355
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
Node 7 async await syntax error #381
Comments
But I can execute the script by node js in command line |
Or should I ask whether J2V8 support the new feature of async/await ??? |
nodeJS = NodeJS.createNodeJS();
String version = nodeJS.getNodeVersion(); ... and check returned version is supports async/await... |
@prakapenka Thanks! Indeed, they are different version. The V8 version with J2V8 is 4.6 while I check the V8 version on my terminal of macos, It's 5.5 |
How to solve this ? compile the J2V8 by myself ? Where could I find the guide for custom cross compile the versions ? |
我就用中文说了,J2V8的v8引擎版本是5.4,到5.5才支持async/await语法,然而现在v8的官方版本已经到6.9了,支持到ES2018了,我现在只能说自己动手丰衣足食…… |
Closing this as a duplicate of #433. That is the bug we are using to track updating to a newer V8. |
I'm trying to use the j2v8 on my Mac which installed node v7.10 , I use below js code in a file:
/**
*/
'use strict';
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const page = await browser.newPage();
await page.emulateMedia('print');
await page.goto('https://dev.capitalpreferences.com/dashboard/setup/signin', {waitUntil: 'networkidle2'});
await page.waitFor(10000);
await page.pdf({path: 'demo.pdf',printBackground: true});
await browser.close();
})();
Error throw
node.js:376
callback();
^
/Volumes/PDrive/Projects/capital_preferences_api/pdfreport.js:7: SyntaxError: Unexpected token (
Any ideas ?
The text was updated successfully, but these errors were encountered: