score:15

Accepted answer

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.

score:0

For me, I have to use these configurations on my webpack.config.js file

module: {
 rules: [
   {
     test: /\.m?js/,
     resolve: { fullySpecified: false },
   },
 ],
}

I know this is an old issue, but it may help someone else

score:3

For me, i solve this by adding .js and .jsx as a resolvable extensions as objectWithoutPropertiesLoose is without extension.

resolve: {
        extensions: [".ts", ".tsx", ".js", ".jsx"]
},

score:9

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.

score:28

Hey ๐Ÿ‘‹! Try this, it worked for me... :)

๐Ÿ‘‰ Using npm:

npm install --save @babel/runtime

๐Ÿ‘‰ Using yarn:

yarn add @babel/runtime

๐Ÿ˜Ž Happy Coding!


Related Query

More Query from same tag