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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Invalid Version: 70001800006 #15604

Closed
1 task done
NogrTL opened this issue May 2, 2023 · 3 comments 路 Fixed by #15605
Closed
1 task done

[Bug]: Invalid Version: 70001800006 #15604

NogrTL opened this issue May 2, 2023 · 3 comments 路 Fixed by #15605
Assignees
Labels
i: needs triage i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@NogrTL
Copy link

NogrTL commented May 2, 2023

馃捇

  • Would you like to work on a fix?

How are you using Babel?

babel-loader (webpack)

Input code

repositore with error -> https://github.com/NogrTL/babel-issue-invalid-version

Error

D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\src\index.jsx: Invalid Version: 70001800006
    at PoolWorker.fromErrorObj (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\thread-loader\dist\WorkerPool.js:302:12)
    at new SemVer (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\semver\semver.js:314:11)
    at compare (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\semver\semver.js:647:10)
    at Function.lt (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\semver\semver.js:688:10)
    at PluginPass.pre (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\@babel\plugin-transform-named-capturing-groups-regex\node_modules\@babel\helper-create-regexp-features-plugin\lib\index.js:50:44)
    at transformFile (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\@babel\core\lib\transformation\index.js:73:27)
    at transformFile.next (<anonymous>)
    at run (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\@babel\core\lib\transformation\index.js:24:12)
    at run.next (<anonymous>)
    at transform (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\@babel\core\lib\transform.js:22:41)
    at transform.next (<anonymous>)
    at step (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:261:32)
    at D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:273:13
    at async.call.result.err.err (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:223:11)
    at D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:189:28
    at D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\@babel\core\lib\gensync-utils\async.js:68:7
    at D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:113:33
    at step (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:287:14)
    at D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:273:13
    at async.call.result.err.err (D:\Nogr\Personal Projects\HTML-CSS-JS\Webpack-Babel-issue\node_modules\gensync\index.js:223:11)

Configuration file name

.babelrc

Configuration

{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-transform-runtime",
["babel-plugin-styled-components", { "fileName": false }],
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": false }]
]
}

Current and expected behavior

Current
Build breaks because of SemVer TypeError 'Invalid Version: '

Excepted
Build or shows more meaningful error of what is wrong and how to fix it

Environment

System:
OS: Windows 11 Pro 22H2 22621.1635
Binaries:
Node: 16.20.0 - ~\AppData\Local\Temp\xfs-869de4b0\node.CMD
Yarn: 3.3.1 - ~\AppData\Local\Temp\xfs-869de4b0\yarn.CMD
npm: 8.19.4 - ~\AppData\Local\nvs\default\npm.CMD
npmPackages:
@babel/core: ^7.21.5 => 7.21.5
@babel/plugin-proposal-class-properties: ^7.18.6 => 7.18.6
@babel/plugin-proposal-decorators: ^7.21.0 => 7.21.0
@babel/plugin-transform-runtime: ^7.21.4 => 7.21.4
@babel/preset-env: ^7.21.5 => 7.21.5
@babel/preset-react: ^7.18.6 => 7.18.6
@babel/runtime: ^7.21.5 => 7.21.5
babel-loader: ^9.1.2 => 9.1.2
babel-plugin-styled-components: ^2.1.1 => 2.1.1
webpack: 5.81.0 => 5.81.0

Possible solution

No response

Additional context

While updating packages encountered this error during build stage. Seems like the reason is line

semver.lt(file.get(versionKey), PACKAGE_JSON.version)
where in my case it's trying to compare key for @babel/plugin-regexp-features/version (70001800006 in my case) with "7.21.5" but fails because it's not a string.

@babel-bot
Copy link
Collaborator

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

@nicolo-ribaudo
Copy link
Member

Oh I'm sorry, I opened #15605 before noticing that you selected "Would you like to work on a fix?" 馃槄

@NogrTL
Copy link
Author

NogrTL commented May 2, 2023

Oh I'm sorry, I opened #15605 before noticing that you selected "Would you like to work on a fix?" 馃槄

No problem. I meant I'm okay to participate, so glad you fixed it :)

@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 Aug 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: needs triage i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants