-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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]: getting `value.ensureFunctionName is not a function" with preset-env 7.25.0 #16682
Comments
Hey @rahearn! 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. |
1, also getting the same error after upgrading to 7.25.0 |
Thanks for the report and suggested fix, that's helpful! |
As a workaround, you can remove |
Fixed in |
💻
How are you using Babel?
babel-loader (webpack)
Input code
webpack --config webpack.config.js
is the command that triggers this. I have no idea what part of the code is actually involved. The error message tells me which source file is the problem, but not which line so I don't know how to give you any input code.Configuration file name
babel.config.js
Configuration
Current and expected behavior
webpack builds started failing on updating to preset-env 7.25.0. I would expect them to continue building properly.
Environment
System:
OS: macOS 14.5
Binaries:
Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
npmPackages:
@babel/core: ^7.24.9 => 7.24.9
@babel/plugin-transform-runtime: ^7.23.9 => 7.24.7
@babel/preset-env: ^7.25.0 => 7.25.0
@babel/preset-react: ^7.18.6 => 7.24.7
babel-loader: ^9.1.3 => 9.1.3
babel-plugin-transform-react-remove-prop-types: ^0.4.24 => 0.4.24
webpack: ^5.92.1 => 5.93.0
Possible solution
Changing
babel/packages/babel-plugin-transform-function-name/src/index.ts
Line 34 in 026c8b3
value.ensureFuctionName
instead ofpath.ensureFunctionName
seems to do the trick, but I don't know enough about the full build pipeline to be sure that's what is intended.Additional context
No response
The text was updated successfully, but these errors were encountered: