ember-fastboot / ember-cli-fastboot

Server-side rendering for Ember.js apps
http://ember-fastboot.com/
MIT License
852 stars 160 forks source link

Fastboot fails with Unexpected token '.' on initial install #837

Closed EstesE closed 3 years ago

EstesE commented 3 years ago
ember -v
ember-cli: 3.26.1
node: 12.18.3
os: linux x64

Error message:

/tmp/broccoli-8354623KTukPTHXx/out-297-append_ember_auto_import_analyzer/assets/vendor.js:24646
      this.forEach(item => ret.push(item[methodName]?.(...args)));
                                                     ^

SyntaxError: Unexpected token '.'
    at new Script (vm.js:88:7)
    at VMSandbox.eval (/home/eric/source-local/github-fastboot-example/node_modules/fastboot/src/vm-sandbox.js:13:22)
    at /home/eric/source-local/github-fastboot-example/node_modules/fastboot/src/ember-app.js:190:15
    at Array.forEach (<anonymous>)
    at EmberApp.loadAppFiles (/home/eric/source-local/github-fastboot-example/node_modules/fastboot/src/ember-app.js:187:21)
    at EmberApp.retrieveSandboxedApp (/home/eric/source-local/github-fastboot-example/node_modules/fastboot/src/ember-app.js:235:10)
    at new EmberApp (/home/eric/source-local/github-fastboot-example/node_modules/fastboot/src/ember-app.js:61:21)
    at FastBoot._buildEmberApp (/home/eric/source-local/github-fastboot-example/node_modules/fastboot/src/index.js:114:17)
    at new FastBoot (/home/eric/source-local/github-fastboot-example/node_modules/fastboot/src/index.js:52:10)
    at /home/eric/source-local/github-fastboot-example/node_modules/ember-cli-fastboot/index.js:335:29
Steps to recreate this:
    ember new github-fastboot-example
    cd github-fastboot-example
    ember install ember-cli-fastboot
    ember s (sparks!)
EstesE commented 3 years ago

Turns out this was caused by my version of Node.