node puppeteer SyntaxError: Unexpected token function

16 min read
> puppeteer@8.0.0 install /root/x/lemon-lab/node_modules/puppeteer
> node install.js

/root/node-work/x/node_modules/puppeteer/install.js:29
async function download() {
      ^^^^^^^^

SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:160:9)

解决:

`npm install n -g

n install 14 `