Giter Club home page Giter Club logo

Comments (14)

sebmck avatar sebmck commented on May 12, 2024 14

Reinstall babel-loader. rm -rf node_modules && npm install to get the latest version of babel.

from babel-loader.

jose920405 avatar jose920405 commented on May 12, 2024 6

Fix my problema installing "@babel/runtime": "7.0.0-beta.55",

from babel-loader.

loganfsmyth avatar loganfsmyth commented on May 12, 2024 4

@rifler @babel/plugin-transform-runtime is a plugin for inserting imports that reference @babel/runtime. This means that @babel/runtime is required by the actual published code, and you should have @babel/runtime in dependencies, whereas you'd have @babel/plugin-transform-runtime in devDependencies.

Your code may have broken if you published your lib with the @babel/runtime dependency with ^ in the version number however, since that means you are stating that you depend on any future version of the @babel/runtime, and since we are still in a beta version, that can be a dangerous thing to do because things are still unstable. You want to be sure that the transform plugin, and @babel/runtime, have exactly the same version.

from babel-loader.

kneekey23 avatar kneekey23 commented on May 12, 2024 2

I am encountering this same issue and I have tried deleting node_modules and re-installing several times as well as npm clean cache --force and doing the same thing over. I always get this error in the browser when I run my .net core app: Error: Module build failed: Error: Cannot find module '@babel/helpers'

from babel-loader.

sebmck avatar sebmck commented on May 12, 2024 1

@grawk It's an internal babel "issue" unrelated to babel-loader. The internal structure of babel-runtime was changed which means that older babel versions output incorrect references to babel-runtime.

from babel-loader.

rifler avatar rifler commented on May 12, 2024 1

In lib all @babel/* packages are in devDeps (beta.54), and consumer decides to use rc-1 version. After update all packages in lib to rc-1 (still all of them in devDeps) things start to work, because webpack now is able to find @babel/runtime/helpers/builtin/es6/objectWithoutProperties
Thank you for response, I'll move @babel/runtime to dependencies, because one day I may want to enable ssr

from babel-loader.

AprilArcus avatar AprilArcus commented on May 12, 2024

thank you!

from babel-loader.

grawk avatar grawk commented on May 12, 2024

This didn't work for me. Should I see a patch version bump?

from babel-loader.

grawk avatar grawk commented on May 12, 2024

OK. New to babel so pardon ignorance. I ran across this issue with https://github.com/krakenjs/confit which had "babel": "^4.6.6" as a devDependency and "babel-runtime": "^4.6.6" as a dependency. When I installed confit into a module where I use it, confit installed 4.7.8 of the babel-runtime, and I received the error mentioned in the issue title. I currently have a PR to confit pending which locks the babel versions to 4.7.3, which i tested and know to be working.

from babel-loader.

sebmck avatar sebmck commented on May 12, 2024

I'll need to make it much more obvious that the versions need to be locked
in the docs since they're essentially internal APIs.

On Wednesday, 11 March 2015, Matt Edelman [email protected] wrote:

OK. New to babel so pardon ignorance. I ran across this issue with
https://github.com/krakenjs/confit which had "babel": "^4.6.6" as a
devDependency and "babel-runtime": "^4.6.6" as a dependency. When I
installed confit into a module where I use it, confit installed 4.7.8 of
the babel-runtime, and I received the error mentioned in the issue title. I
currently have a PR to confit pending which locks the babel versions to
4.7.3, which i tested and know to be working.

Reply to this email directly or view it on GitHub
#39 (comment).

Sebastian McKenzie

from babel-loader.

grawk avatar grawk commented on May 12, 2024

Maybe my mind was playing tricks but I appeared to have the same version of both modules (4.7.8) when I encountered the problem. Are you saying that I encountered it because the versions didn't match at some point?

from babel-loader.

sebmck avatar sebmck commented on May 12, 2024

Most likely. npm is really weird most of the time. babel-runtime is built
and published the same whenever I publish a new babel version so they're
guaranteed to be compatible.

On Wednesday, 11 March 2015, Matt Edelman [email protected] wrote:

Maybe my mind was playing tricks but I appeared to have the same version
of both modules (4.7.8) when I encountered the problem. Are you saying that
I encountered it because the versions were off at some point?

Reply to this email directly or view it on GitHub
#39 (comment).

Sebastian McKenzie

from babel-loader.

victor-3wp avatar victor-3wp commented on May 12, 2024

Have you tried updating the @bable/runtime package

from babel-loader.

rifler avatar rifler commented on May 12, 2024

I publish lib with import _objectWithoutProperties from "@babel/runtime/helpers/builtin/es6/objectWithoutProperties";. Before publish, this lib runs @babel/... version beta.54.
Consumer, for example, uses rc.1, and this code breaks.
What is the right way to publish libs? move @babel from devDeps to deps?

from babel-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.