Error with 'babel-runtime' while trying to serve a Meteor app

前端 未结 3 1652
旧时难觅i
旧时难觅i 2021-01-06 06:02

I have recently been getting off the ground with Meteor and React. I followed the tutorial on the Meteor website with no problem.

Then I tried creating another proje

相关标签:
3条回答
  • 2021-01-06 06:49

    I was having the same issue. After a little digging, found this: https://github.com/meteor/meteor/issues/8019

    * Installing the `babel-runtime` npm package in your application
      `node_modules` directory is now required for most Babel-transformed code
      to work, as the Meteor `babel-runtime` package no longer attempts to
      provide custom implementations of Babel helper functions.
    Consider trying it out by using the latest release candidate (not officially released yet):
    
    meteor update --release 1.4.2.1-rc.1
    And then:
    
    meteor npm install --save babel-runtime
    

    After upgrading to 1.4.2.1-rc.1 (and then subsequently upgrading to 1.4.2.1 this morning 11/9), the error was resolved.

    0 讨论(0)
  • 2021-01-06 06:57

    Try adding package.json file inside your project directory and then run meteor

    npm install --save babel-runtime

    in the command line.

    0 讨论(0)
  • 2021-01-06 07:08

    You may have whitespace in your project name. All that you have to do is create another project without whitespace in the name. I know that it's quite difficult to detect the cause from the error message, but it is what it is.

    I recently faced this issue with meteor 1.11.1 and the solutions here did not work. Turns out I had whitespaces in my project name (Ghughu Server V2) and all I had to do is create another one without the spaces (GhughuServerV2).

    P.S. It works fine even if you have whitespace in the path to your project, you just can't have whitespace in the project name. Also, just renaming the directory doesn't work. Either you have to create a brand new project or change some configuration inside (which seems impractical if you're working in a newly created project).

    0 讨论(0)
提交回复
热议问题