question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Seems to break with latest ember-cli-typescript

See original GitHub issue

I’m in the progress of trying embroider with our app.

Seems like something is breaking in regards to the latest TS version (via ember-cli-typescript):

unable to resolve babel plugin @babel/plugin-proposal-optional-chaining from

- broccoliBuilderErrorStack: Error: unable to resolve babel plugin @babel/plugin-proposal-optional-chaining from /tmp/embroider/13b7f6/project
    at PortableBabelConfig.resolveBabelPlugin (/path/to/project/node_modules/@embroider/core/src/portable-babel-config.js:74:27)
    at PortableBabelConfig.makePortable (/path/to/project/node_modules/@embroider/core/src/portable-babel-config.js:22:29)
    at /path/to/project/node_modules/@embroider/core/src/portable-plugin-config.js:64:55

The only usage of the babel plugin from our yarn.lock:

ember-cli-typescript@^3.1.1:
  version "3.1.1"
  resolved "https://registry.yarnpkg.com/ember-cli-typescript/-/ember-cli-typescript-3.1.1.tgz#a5a12ebf915e43ded7bf6bb460ecea4b67b0d95b"
  integrity sha512-HCjM5EZ29Yh94Jy/M2+MVkS9LdtOoGYtYLIcZ4F7umJaRJM67ku/xCyN/2r+uTeYTNdpJN9+HWx30a6yyAbfRA==
  dependencies:
    "@babel/plugin-proposal-nullish-coalescing-operator" "^7.4.4"
    "@babel/plugin-proposal-optional-chaining" "^7.6.0"
    "@babel/plugin-transform-typescript" "~7.7.0"

e-c-ts is adding the babel plugins like this:

https://github.com/typed-ember/ember-cli-typescript/blob/39e3b7f2f9cec078b69e732db15da4471af392c4/ts/addon.ts#L84

So maybe the issue is in ember-cli-babel-plugin-helpers adding the plugin in a way that embroider isn’t supporting: https://github.com/dfreeman/ember-cli-babel-plugin-helpers/blob/master/src/index.ts#L77

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jamescdaviscommented, Dec 14, 2019

ember-cli-typescript@3.1.2 has been released and includes this fix.

1reaction
makepaniccommented, Nov 20, 2019

The fix in ember-cli-typescript wasn’t released yet. You can resolve the package to https://github.com/typed-ember/ember-cli-typescript/commit/c9314993aff1bcfa5ffe10578ddbbb80bc89a0bf if you want use the fix in your app

Read more comments on GitHub >

github_iconTop Results From Across the Web

ember-cli-typescript with React breaks the build pipeline #1459
I get an error when trying to run yarn start , presumably because ember-cli-typescript tries to alter my jsx code before my defined...
Read more >
Failing Ember CLI builds on TypeScript errors
There will be type errors, but I want to be able to run tests and make sure I am not breaking anything while...
Read more >
ember-cli-typescript - npm
Allow Ember apps to use TypeScript files.. Latest version: 5.2.1, last published: 14 days ago. Start using ember-cli-typescript in your ...
Read more >
Testing - ember-cli-typescript
When working with TypeScript in Ember tests, there are a few differences in your experience, and there are also differences in how you...
Read more >
ember-cli-typescript | Yarn - Package Manager
Allow Ember apps to use TypeScript files. ember-addon, typescript. readme. ember-cli-typescript. Use TypeScript in your Ember 2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found