yup: Unable to resolve "@babel/runtime/helpers/builtin/interopRequireDefault"
Hi guys, today I update yup to 0.25.0 and im getting the following error:
Unable to resolve "@babel/runtime/helpers/builtin/interopRequireDefault" from "node_modules/yup/lib/index.js"
Failed building JavaScript bundle.
Rolling back to v0.24.1 fix the issue, any advice?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 31
- Comments: 42 (7 by maintainers)
Commits related to this issue
- Pin dependency on `@babel/runtime`, latest version causes errors https://github.com/jquense/yup/issues/216 — committed to apollographql/apollo-server by clarencenpy 6 years ago
- Pin dependency on `@babel/runtime`, latest version causes errors https://github.com/jquense/yup/issues/216 — committed to apollographql/apollo-server by clarencenpy 6 years ago
- :unamused: chore(deps): up deps but ... pin @babel/* to 7.0.0-beta.55 see for instance https://github.com/jquense/yup/issues/216 — committed to infoderm/patients by make-github-pseudonymous-again 6 years ago
- babel runtime added https://github.com/jquense/yup/issues/216 — committed to er3n/felesel by er3n 6 years ago
Quick fix:
npm add @babel/runtime
Everyone probably already has @babel/runtime as dependencies. Unfortunately Babel has removed the builtin helpers since v7.0.0-beta.56 (3 days ago). Since npm doesn’t automatically update most people won’t have this problem.
Try installing v7.0.0-beta.55, this fixes your problem:
Same here. I Solved pinning the version:
"@babel/runtime": "7.0.0-beta.55"
😦Installing yup@^0.26.2 resolves this.
I have the same issue and installing the latest babel/runtime doesn’t work for me
Sorry ! I forgot to say that I also had to run:
npm add @babel/runtime
@babel/rutnime@7.1.2 did not work. I am having to downgrade @babel/runtime with the following command to get yup to work:
Using the latest of @babel/runtime and yup still gives the original error:
Deleting yarn.lock and node_modules/ did not help.
I’m still having this issue with
yup@0.26.6
. I’m also using CRA, but as far as I’ve read it shouldn’t matter right?@kisenka 0.26.2 is up to date and working
This worked for me. yarn add @babel/runtime --dev
Try -> npm add babel-preset-react-native It worked for me.
I’m having the same issue but on
@babel/runtime
7.0.0-beta.46
(which is what latest CRA 2.0 uses).EDIT
Can confirm that upgrading to
@babel/runtime
7.0.0-beta.55
resolves the issue. Unfortunately, it’s currently incompatible withcreate-react-app
next.3e165448
.@jquense could you elaborate by what you mean when say something is broken in your build setup ? I only get this error when I import yup into a file. I’ve tried what you suggested as well as a number of other things in this thread to no avail 😞
I’m on Yup v0.26.6
npm add @babel/runtime
worked for me as well.Y’all upgrade yup to the latest, delete you lock file and node_modules and reinstall. That should fix it. If you still have the issue something is broken in your build setup
Upgrade please, fix released thanks!
None of these have worked for me 😦
hello. have you fixed it yet ?
Instead of pulling in the latest @babel/runtime beta version, perhaps this should be pinned to a specific version?
https://github.com/jquense/yup/blob/v0.26.0/package.json#L86