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

Unable to resolve "@babel/runtime/helpers/builtin/interopRequireDefault" #216

Closed
outaTiME opened this Issue May 16, 2018 · 39 comments

Comments

Projects
None yet
@outaTiME

outaTiME commented May 16, 2018

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?

@hvolschenk

This comment has been minimized.

hvolschenk commented May 16, 2018

Getting a similar issue since upgrading to 0.25.0:

ERROR in ./node_modules/yup/lib/object.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/taggedTemplateLiteralLoose' in '/home/node/app/node_modules/yup/lib'
@k7sleeper

This comment has been minimized.

k7sleeper commented May 17, 2018

Quick fix: npm add @babel/runtime

@jquense

This comment has been minimized.

Owner

jquense commented May 17, 2018

Upgrade please, fix released thanks!

@jquense jquense closed this May 17, 2018

@hua-lu

This comment has been minimized.

hua-lu commented Aug 6, 2018

I have the same issue and installing the latest babel/runtime doesn't work for me

@hielkehoeve

This comment has been minimized.

hielkehoeve commented Aug 6, 2018

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:

...
    "@babel/runtime": "7.0.0-beta.55",
...
}```
@hielkehoeve

This comment has been minimized.

hielkehoeve commented Aug 6, 2018

@jquense Since you are referencing to babel runtime helper files directly it might be a good idea to update yup to use the correct babel/runtime/helpers using babel/runtime v7.0.0-beta.56 paths or depend on v7.0.0-beta.55 at most?

Babel has decided to move all builtin runtime helpers to a separate package:
babel/babel@a8224d4

@nfantone

This comment has been minimized.

nfantone commented Aug 6, 2018

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 with create-react-app next.3e165448.

@bbakersmith

This comment has been minimized.

Contributor

bbakersmith commented Aug 6, 2018

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

clarencenpy added a commit to apollographql/apollo-server that referenced this issue Aug 7, 2018

@soulclown

This comment has been minimized.

soulclown commented Aug 7, 2018

Same here. I Solved pinning the version: "@babel/runtime": "7.0.0-beta.55" :(

clarencenpy added a commit to apollographql/apollo-server that referenced this issue Aug 7, 2018

@Jtango18

This comment has been minimized.

Jtango18 commented Aug 10, 2018

Installing yup@^0.26.2 resolves this.

@SirPhemmiey

This comment has been minimized.

SirPhemmiey commented Aug 17, 2018

@nfantone "@babel/runtime": "7.0.0-beta.55" works and it's compatible with create-react-app.
Thanks for this @hielkehoeve

aureooms added a commit to dermatodoc/patients that referenced this issue Aug 19, 2018

😒 chore(deps): up deps but ...
pin @babel/* to 7.0.0-beta.55
see for instance jquense/yup#216
@kisenka

This comment has been minimized.

kisenka commented Aug 20, 2018

@jquense looks like 0.26.2 was published with old runtime which relies on @babel/runtime@7.0.0-beta.55, could you please publish new version with actual runtime?

@jquense

This comment has been minimized.

Owner

jquense commented Aug 20, 2018

@kisenka 0.26.2 is up to date and working

@Woile

This comment has been minimized.

Woile commented Sep 24, 2018

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?

./node_modules/yup/lib/Lazy.js
Module not found: Can't resolve '@babel/runtime/helpers/objectWithoutPropertiesLoose' in './node_modules/yup/lib'
@infaz

This comment has been minimized.

infaz commented Sep 26, 2018

Try -> npm add babel-preset-react-native
It worked for me.

er3n added a commit to er3n/felesel that referenced this issue Sep 26, 2018

@huuhuybn

This comment has been minimized.

huuhuybn commented Sep 27, 2018

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?

./node_modules/yup/lib/Lazy.js
Module not found: Can't resolve '@babel/runtime/helpers/objectWithoutPropertiesLoose' in './node_modules/yup/lib'

hello. have you fixed it yet ?

@phandinhai

This comment has been minimized.

phandinhai commented Sep 27, 2018

npm add @babel/runtime

ths you.

@MingyuJeon

This comment has been minimized.

MingyuJeon commented Sep 27, 2018

Same problem and I resolved by install @babel/runtime: '^7.0.0'

@ropoja

This comment has been minimized.

ropoja commented Sep 27, 2018

Quick fix: npm add @babel/runtime

Had this issue after creating react native app with react-native cli, solved with this. Thank you.

@cluis13915

This comment has been minimized.

cluis13915 commented Sep 28, 2018

I solve same issue and I share you what happen.
The error was in step 3: Configure the ANDROID_HOME environment variable

For some reason the .bash_profile isn't loaded at shell starts. So I put the stuffs in .profile file, but did not work either. Finally I put all in .bashrc file and configure my terminal (Terminator) to NOT run commands as a login shell.

After that I was able to see the correct path with echo $ANDROID_HOME, running react-native run-android lauched successfully my "Welcome to React Native!" app.

@cluis13915

This comment has been minimized.

cluis13915 commented Sep 28, 2018

Sorry ! I forgot to say that I also had to run:

npm add @babel/runtime

@rootguigui

This comment has been minimized.

rootguigui commented Sep 28, 2018

npm add @babel/runtime to me it's working.... thanks for help

@jquense

This comment has been minimized.

Owner

jquense commented Sep 29, 2018

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

@scheffeld

This comment has been minimized.

scheffeld commented Sep 29, 2018

npm add @babel/runtime

Nice man, work for me.

@DavidPr0

This comment has been minimized.

DavidPr0 commented Sep 30, 2018

Opa estava com o mesmo erro e resolvido com o comando
npm add @babel/runtime

@ctoynbee

This comment has been minimized.

ctoynbee commented Oct 2, 2018

react-native run-android

Similar issue for me. I use ZSH and even though echo $ANDROID_HOME works in ZSH it wasn't working when running react-native run-ios

Adding this to .bashrc fix it:

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/emulator

@naxir

This comment has been minimized.

naxir commented Oct 2, 2018

lol developer whole life #FUN #Family #Code 👍
npm add @babel/runtime lolzz

@arobbins

This comment has been minimized.

arobbins commented Oct 2, 2018

npm add @babel/runtime worked for me as well.

@wixys

This comment has been minimized.

wixys commented Oct 3, 2018

Quick fix: npm add @babel/runtime

Worked for me, many thanks!

@lasersox

This comment has been minimized.

lasersox commented Oct 6, 2018

None of these have worked for me :(

@ryadaval

This comment has been minimized.

ryadaval commented Oct 9, 2018

Quick fix: npm add @babel/runtime

This worked for me.

@okanthony

This comment has been minimized.

okanthony commented Oct 10, 2018

The error I was experiencing was related to yup:

Cannot find module '@babel/runtime/helpers/builtin/interopRequireDefault' from 'index.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)
      at Object.<anonymous> (node_modules/yup/lib/index.js:3:30)

I added @babel/runtime and upgraded yup to 0.26.2 which fixed it

@kdawgwilk

This comment has been minimized.

kdawgwilk commented Oct 16, 2018

I am seeing this error when trying to run storybooks when using RN 0.56. I am starting up storybooks by using react-native start --projectRoots pwd/storybook --reset-cache none of the above steps have helped

@andileka

This comment has been minimized.

andileka commented Oct 22, 2018

This worked for me.
yarn add @babel/runtime --dev

@activescott

This comment has been minimized.

activescott commented Nov 4, 2018

@babel/rutnime@7.1.2 did not work. I am having to downgrade @babel/runtime with the following command to get yup to work:

yarn upgrade @babel/runtime@7.0.0-beta.55

Using the latest of @babel/runtime and yup still gives the original error:

Error: Cannot find module '@babel/runtime/helpers/builtin/interopRequireDefault'

Deleting yarn.lock and node_modules/ did not help.

@onekiloparsec

This comment has been minimized.

onekiloparsec commented Nov 26, 2018

I confirm too that @babel/runtime@7.1.5 did not work. Downgrading to -beta.55 worked though.

@vincentjames501

This comment has been minimized.

Contributor

vincentjames501 commented Nov 28, 2018

adding dev dependency @babel/runtime 7.1.5 did work for me. I suspect that if yup updated its package.json to 7.1.5 it may fix the issue for most people here.

@SerkoNikolas

This comment has been minimized.

SerkoNikolas commented Nov 29, 2018

I have added @babel/runtime 7.1.5, but the error still exists. Yup ver. 0.26.6
I deleted node_modules folder before installing

@jplwood

This comment has been minimized.

jplwood commented Dec 12, 2018

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

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment