Skip to content
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

Added installation instructions for FastBoot users #50

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Aug 4, 2020

Description

This addon uses nullish coalescing operator ??, introduced in ECMA2020 (in June 2020) and natively supported in Node starting v14.0. Because Ember's blueprint for config/targets.js uses last 1 versions for browsers, there's a good chance that ?? doesn't get transpiled anymore.

As a result, developers who use ember-cli-fastboot and ember-container-query can encounter this build error:

/var/folders/2z/93zyyhx13rs879qr8rzyxrb40000gn/T/broccoli-689520dxo26a682Mz/out-529-broccoli_merge_trees/assets/vendor.js:121232
  return this.args.features ?? {};
                             ^

SyntaxError: Unexpected token '?'
  at new Script (vm.js:88:7)
  at VMSandbox.eval (/my-app/node_modules/fastboot/src/vm-sandbox.js:13:22)
  at /my-app/node_modules/fastboot/src/ember-app.js:190:15
  at Array.forEach (<anonymous>)
  at EmberApp.loadAppFiles (/my-app/node_modules/fastboot/src/ember-app.js:187:21)
  at EmberApp.retrieveSandboxedApp (/my-app/node_modules/fastboot/src/ember-app.js:235:10)
  at new EmberApp (/my-app/node_modules/fastboot/src/ember-app.js:61:21)
  at FastBoot._buildEmberApp (/my-app/node_modules/fastboot/src/index.js:114:17)
  at new FastBoot (/my-app/node_modules/fastboot/src/index.js:52:10)
  at /my-app/node_modules/ember-cli-fastboot/index.js:330:29

At a glance, it's not obvious what developers need to do to fix this error. (It certainly wasn't to me when I had encountered this error.) Based on Jeff's feedback in #49, I decided to explicitly mention what to do in the README.

References

@ijlee2 ijlee2 force-pushed the add-warning-to-readme branch from c8b0350 to 7203bb8 Compare August 4, 2020 01:21
@ijlee2 ijlee2 force-pushed the add-warning-to-readme branch from 7203bb8 to 1beb39a Compare August 4, 2020 01:34
@ijlee2 ijlee2 merged commit 7860aff into main Aug 4, 2020
@ijlee2 ijlee2 deleted the add-warning-to-readme branch August 4, 2020 01:39
@ijlee2 ijlee2 added the enhance: documentation Issue asks for better documentation (e.g. README, code, tests) label Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance: documentation Issue asks for better documentation (e.g. README, code, tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant