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

Webpack breaking change: The extension in the request is mandatory #12169

Closed
1 task
Floffah opened this issue Oct 13, 2020 · 4 comments
Closed
1 task

Webpack breaking change: The extension in the request is mandatory #12169

Floffah opened this issue Oct 13, 2020 · 4 comments
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@Floffah
Copy link

Floffah commented Oct 13, 2020

Bug Report

  • I would like to work on a fix!
    i would but laziness you know

Current behavior
In the newly released Webpack 5 (released 3 days ago as of writing this), for a lot of files that are required by webpack to work, you get the following error example:

ERROR in ../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js 4:0-52
Module not found: Error: Can't resolve './nonIterableSpread' in 'D:\projects\unfinished\app\a-guide\node_modules\@babel\runtime\helpers\esm'
Did you mean 'nonIterableSpread.js'?
BREAKING CHANGE: The request './nonIterableSpread' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/rc-table/es/Table.js 3:0-78 212:24-42 214:34-52
 @ ../node_modules/antd/es/table/Table.js 9:0-51 405:19-33
 @ ../node_modules/antd/es/table/index.js 1:0-28 2:15-20
 @ ../node_modules/antd/es/index.js 56:0-43 56:0-43
 @ dll library

Input Code

No code is written, this occurs even in the most basic-est of webpack configurations (however mostly occurs in dlls)

Expected behavior
The files should be compiled into webpack successfully

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

  • Filename: babel.config.js

there is none

Environment


  • Babel version(s): [e.g. v6.0.0, v7.0.0-beta.34] webpack's one
  • Node/npm version: [e.g. Node 8/npm 5] node 12.18.4/6.14.6 & 14.13.0/6.14.8
  • OS: [e.g. OSX 10.13.4, Windows 10] windows 10
  • Monorepo: [e.g. yes/no/Lerna] - dont know what that is so presumed not
  • How you are using Babel: [e.g. cli, register, loader] through webpack

Possible Solution

just add file extensions in your imports

Additional context
webpack broke a lot of files lmao

@babel-bot
Copy link
Collaborator

Hey @Floffah! 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."

@Floffah Floffah mentioned this issue Oct 13, 2020
34 tasks
@Floffah Floffah changed the title Webpack breaking feature: The extension in the request is mandatory for it to be fully specified. Webpack breaking feature: File extensions need to be specified Oct 13, 2020
@Floffah Floffah changed the title Webpack breaking feature: File extensions need to be specified Webpack breaking change: The extension in the request is mandatory Oct 13, 2020
@JLHwung
Copy link
Contributor

JLHwung commented Oct 13, 2020

Duplicate of #12158

@JLHwung JLHwung marked this as a duplicate of #12158 Oct 13, 2020
@JLHwung JLHwung closed this as completed Oct 13, 2020
@JLHwung
Copy link
Contributor

JLHwung commented Oct 14, 2020

Fixed in @babel/runtime@7.12.0.

@Floffah
Copy link
Author

Floffah commented Oct 15, 2020

@JLHwung thank you

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 15, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

4 participants