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

[v7.21.0] includeExternalHelpers option breaking with latest @babel #384

Closed
hoIIer opened this issue Mar 1, 2021 · 11 comments
Closed

[v7.21.0] includeExternalHelpers option breaking with latest @babel #384

hoIIer opened this issue Mar 1, 2021 · 11 comments
Labels

Comments

@hoIIer
Copy link

hoIIer commented Mar 1, 2021

I cleared node_modules and ran npm install with version 7.21.0 and when I run ember serve I get the following error:

Error: Could not find module @babel/runtime/helpers/initializerDefineProperty/_index.mjs imported from @babel/runtime/helpers/esm/initializerDefineProperty
    at missingModule (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/vendor/loader/loader.js:247:1)
    at findModule (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/vendor/loader/loader.js:258:1)
    at Module.findDeps (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/vendor/loader/loader.js:168:1)
    at findModule (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/vendor/loader/loader.js:262:1)
    at Module.findDeps (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/vendor/loader/loader.js:168:1)
    at findModule (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/vendor/loader/loader.js:262:1)
    at requireModule (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/vendor/loader/loader.js:24:1)
    at Class._extractDefaultExport (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/addon-tree-output/ember-resolver/resolvers/classic/index.js:445:1)
    at Class.resolveOther (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/addon-tree-output/ember-resolver/resolvers/classic/index.js:105:1)
    at Class.resolve (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/addon-tree-output/ember-resolver/resolvers/classic/index.js:168:1)
    at resolve (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/@ember/-internals/container/index.js:1223:1)
    at Registry.resolve (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/@ember/-internals/container/index.js:763:1)
    at Class.resolveRegistration (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/@ember/-internals/runtime/lib/mixins/registry_proxy.js:32:1)
    at setupSessionRestoration (/var/folders/9r/gp7xyl_j0l3flcwp78j7mjcr0000gn/T/broccoli-276094EuqwRsv8Chf/out-559-broccoli_merge_trees/assets/addon-tree-output/ember-simple-auth/initializers/setup-session-restoration.js:10:1)

...

I tried using npm-force-resolutions and set @babel/runtime: 7.12.0 but then I get a different error when running ember server:

Class constructor Plugin cannot be invoked without 'new'

I'm not sure if something is messed up with upstream babel or otherwise? really stuck

possibly related:
ConnectedHomes#1
babel/babel#12881

Update

I figured out that removing the following previously working config clears the error and loads the app:

    'ember-cli-babel': {
      includeExternalHelpers: true,
    },

Unsure why that would suddenly break? (ember-cli-babel 7.21.0)

@hoIIer hoIIer changed the title [v7.21.0] Could not find module @babel/runtime/helpers/initializerDefineProperty/_index.mjs imported from @babel/runtime/helpers/esm/initializerDefineProperty [v7.21.0] Could not find module @babel/runtime/helpers/initializerDefineProperty/_index.mjs Mar 1, 2021
@hoIIer hoIIer changed the title [v7.21.0] Could not find module @babel/runtime/helpers/initializerDefineProperty/_index.mjs [v7.21.0] Could not find module @babel/runtime/helpers/initializerDefineProperty/_index.mjs Mar 1, 2021
@hoIIer hoIIer changed the title [v7.21.0] Could not find module @babel/runtime/helpers/initializerDefineProperty/_index.mjs [v7.21.0] includeExternalHelpers option breaking with latest @babel Mar 1, 2021
@Turbo87
Copy link
Member

Turbo87 commented Mar 1, 2021

FWIW we're having having a similar issue with the Qonto.com apps. we're also using includeExternalHelpers for those.

@Turbo87 Turbo87 added the bug label Mar 1, 2021
@rwjblue
Copy link
Member

rwjblue commented Mar 1, 2021

Can one of y'all make a reproduction?

@Turbo87
Copy link
Member

Turbo87 commented Mar 1, 2021

@rwjblue
Copy link
Member

rwjblue commented Mar 1, 2021

Thank you, will try to review the demo this afternoon and see what we can do to mitigate...

@rwjblue
Copy link
Member

rwjblue commented Mar 2, 2021

Can you test now that https://github.com/babel/babel/releases/tag/v7.13.9 is published? I think babel/babel#12919 was specifically fixing htis issue...

@hoIIer
Copy link
Author

hoIIer commented Mar 2, 2021

@rwjblue that fixed it for me! thanks

@hoIIer hoIIer closed this as completed Mar 2, 2021
@Turbo87
Copy link
Member

Turbo87 commented Mar 2, 2021

I can confirm. Works well on the crates.io codebase too 👍

thank you @rwjblue 🤗

@Turbo87
Copy link
Member

Turbo87 commented Mar 3, 2021

looks like we're still having similar issues on some other apps though:

Could not find module @babel/runtime/helpers/esm/arrayWithHoles.js imported from @babel/runtime/helpers/esm/slicedToArray

@rwjblue
Copy link
Member

rwjblue commented Mar 3, 2021

@Turbo87 And you can confirm you only have "good" Babel runtime versions (e.g. with yarn why)?

@Turbo87
Copy link
Member

Turbo87 commented Mar 3, 2021

Bildschirmfoto 2021-03-03 um 14 19 01

looks like it, yes

not sure yet what the difference is to the repro in crates.io that appears to work fine now 🙈

@rwjblue
Copy link
Member

rwjblue commented Mar 15, 2021

Basically babel is including the extension in the import paths for the helpers, and our transpilation doesn't support modules at runtime including the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants