How to fix - Module not found: Can't resolve '@babel/runtime/helpers/objectWithoutPropertiesLoose'
Hey 👋! Try this, it worked for me... :)
👉 Using npm:
npm install --save @babel/runtime
👉 Using yarn:
yarn add @babel/runtime
😎 Happy Coding!
I found a solution
npm install --save-exact @babel/runtime@7.0.0-beta.55
Then delete the package-json.lock file and node_modules folder then re-install with npm install
It works for me.
Make sure you got @babel/runtime
installed into your regular dependencies
and not the devDependencies
(leave out the --dev
or the -D
flag when installing).
npm i @babel/runtime
OR
yarn add @babel/runtime
Else it's going to be missing when doing a production installation (which leaves out the devDependencies
section), which is what happened to me.
All provided answers are correct in most cases but I wanted to add an explanation:Babel's runtime is a production runtime that ships with your code so it can't just be left out because it runs on the client.