Hi,
I have a project created with create-react-app that is using yup. Today I have to run a yarn upgrade, and after that I can't start the project. I get this error:
Module not found: Can't resolve '@babel/runtime/helpers/builtin/extends' in '/Users/alberto.iglesias/Coding/iteisa/projects/cam/node_modules/yup/lib'
Watching other issues, I've seen the babel beta.56 directory problem, so I've finally forced to add the babel beta.55 version, and is starting again. I think is valid as a temporary patch, but maybe there's other packages installed by react-scripts that depends of beta.56, so I'm not sure if it's going to generate other problems.
@rigobauer I'm confused, did you install @babel/[email protected]? Into your project or yup's?
This babel problem is giving me a world of pain. It's affected a bunch of libs that I am using. I understand babel v7 is in beta, and breaking changes can be expected between versions, but it's a pain when transitive dependencies cause your apps to fail. I've been trying to wrap my head around the babel v6 -> v7 movement, and why so many lib authors have moved so quickly onto depending on v7.
Can confirm that forcing an install of previous version of @babel/runtime sorts the problem.
@rigobauer if the solution @ctrlplusb suggested doesn't resolve it, I'd suggest following this
solution in issue #260.
Moving all the files from the parent helpers/ dir to a new helpers/builtin/ dir solved import issues I was having.
Lowering to 0.25.0 will fix the issue. Don't go to 0.25.1+
If you use webpack, you can add an alias until yup is updated
resolve: {
...
alias: {
'@babel/runtime/helpers/builtin': path.resolve('./node_modules/@babel/runtime/helpers'),
...
@Tav0 I installed it into my project.
@kievechua
React-nativeMetro bundler haven't got alias
fixed in 0.26.1
@jquense Seems like 0.26.1 is just a version bump https://github.com/jquense/yup/commits/master, no other changes are there.
And Bebel is v7.0.0-rc.1 already
confirm the issue is gone after update to 0.26.2
@jquense Mmmm.... looks that 0.26.2 solve something, but yarn still doesn't start, now showing this error...
./node_modules/yup/lib/customLocale.js
Module not found: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in
'/Users/alberto.iglesias/Coding/iteisa/projects/cam/node_modules/yup/lib'
customLocale.js should no longer be used, according to https://github.com/jquense/yup/issues/260#issuecomment-411930836
setLocale is now exported with the other functions.
@renchap You're right! That solved it
Most helpful comment
If you use webpack, you can add an alias until yup is updated