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
bug: Can't resolve '@babel/runtime/helpers/esm/extends [7.13.0 to 7.13.5] #12881
Comments
Hey @merlinpatt! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
This might be fixed by #12877 |
Can you check if v7.13.6 of |
Unfortunately it did not fix it. |
I am also facing the same issue. Updating |
In https://unpkg.com/browse/@babel/runtime@7.13.6/helpers/extends/ |
Oh I think I know the problem |
I accidentally pushed the fix to The problem is that we had export maps like I fixed it by explicitly listing all the exports of the |
|
Sorry I forgot to release the fix, doing it now: https://github.com/babel/babel/actions/runs/595458532 |
That seems unrelated, please open a new issue with a link to a GitHub repository I can download to reproduce the error. |
This is the important part: without it I don't know what's the issue. From the first screenshot you posted it seems like that file is exporting a string, but it's clearly not exporting a string in the second screenshot. |
first screenshot: second screenshot: |
I see, but why is it loading that file as base64? That doesn't make sense in any runtime or bundler I know of. index.mjs is a normal JavaScript esm file. |
yeah, maybe wrong config/env... or old version of webpack. |
i will making repository with sample for reproduce . |
Could it be facebook/create-react-app#5234? It seems like a create-react-app bug. |
resolved. why is it loading that file as base64 : url-loader. It build-in roadhog. solution: module.exports = config => {
config.module.rules.forEach(item => {
if (item.loader && item.loader.indexOf('url-loader') > -1) {
item.exclude.push(/\.mjs$/);
}
});
return config;
}; thanks |
We are getting this below error after upgrading babel from Uncaught Error: Could not find module `@babel/runtime/helpers/defineProperty/_index.mjs` imported from `@babel/runtime/helpers/esm/defineProperty`
at missingModule (loader.js:247)
at findModule (loader.js:258)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at requireModule (loader.js:24)
at tests-suffix.js:1 |
@paulashwin If the |
I'm closing this issue, since:
|
freshly installed @babel/runtime v7.13.7 it is due to
works correctly when I change the content of index.js file with the content of _index.mjs
|
@paztis What bundler are you using? |
typescript (tsc) It was not failing until I upgrade to babel 7.13. Any changes on your side in the source code of this file ? |
This file is new, the previous versions were https://unpkg.com/browse/@babel/runtime@7.12.0/helpers/extends.js and https://unpkg.com/browse/@babel/runtime@7.12.0/helpers/esm/extends.js. I think #12883 will fix your error, but I cannot be sure without knowing what is throwing the error (Node.js? Webpack? another bundler? tsc itself when typechecking?) |
Tsc itself
Le mer. 24 févr. 2021 à 19:41, Nicolò Ribaudo <notifications@github.com> a
écrit :
… Any changes on your side in the source code of this file?
This file is new, the previous versions were
***@***.******@***.***/helpers/extends.js and
***@***.******@***.***/helpers/esm/extends.js. I
*think* #12883 <#12883> will fix your
error, but I cannot be sure without knowing what is throwing the error
(Node.js? Webpack? another bundler? tsc itself when typechecking?)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12881 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIKMMKVPHFSVO2CIPFU6O3TAVB7FANCNFSM4YC4MSTA>
.
|
Can you provide a reproduction repo? |
Hard for me. We've got a n enormous private repo that was working fine and sudently crashes.
With allowJs option it processes the us files also. |
I also create a defect in typescript: microsoft/TypeScript#42942 (comment) |
here is a repo where I reproduce the defect Locally, with the same code I've the error, but don't know why not on codeSandbox just run the command npm run build on it extra info: node: v14.15.0, system: bigSur |
no I create from scratch specific repo and always reproduce it It contains only 4 files: package.json, tsConfig.json, src/index.ts and src/js/problematicFile.js |
It's possible that this will be fixed by 6a471de in the next release, but I'm not 100% sure because I cannot reproduce the error when I download that codesandbox example |
ok I've update the codeSandbox: https://codesandbox.io/s/twilight-sound-ll66d you can test in now it fails everywhere when will be the next release ? |
Ok, I can reproduce the error. However, I now understand that it will not be fixed in the next Babel release because this is 100% a TypeScript bug. |
just hit this in my project using ember-cli-babel@7.24.0 that uses
|
@burritoIand That isn't a Babel bug. Whatever bundler Ember is using, it probably configured to ignore files ending in However, we might stop using |
@nicolo-ribaudo ok great thanks! |
Bug Report
Current behavior
When the
Run server
step runs in this GitHub Actions Build, this error is given:ModuleNotFoundError: Module not found: Error: Can't resolve '@babel/runtime/helpers/esm/extends'
This currently happens with
@babel/runtime
from7.13.0
to7.13.5
.Current Fix
I was able to resolve this by install @babel/runtime
as a devDependency and forcing it to stay at
7.12.18`. This can be seen in this GitHub Actions BuildEnvironment
Additional context
I'm not sure but I think this may be related to #12880.
The text was updated successfully, but these errors were encountered: