尝试提供Meteor应用时出现"babel-runtime"错误 [英] Error with 'babel-runtime' while trying to serve a Meteor app
问题描述
我最近刚开始使用Meteor和React.我在Meteor网站上完全按照教程进行了操作. >
然后我尝试创建另一个项目,尝试遵循另一个教程(适用于旧版本的Meteor).沿线的某个地方,流星开始抛出模糊的错误.在尝试再次重新开始后,我最终重新安装了Meteor,并且不再抱怨.
但是,我再次遇到相同的问题.具体来说,在创建全新项目后:
meteor create myproject
cd myproject
meteor
服务器抛出以下错误:
[...]
W20161109-03:53:42.862(1)? (STDERR) Error: The babel-runtime npm package could not be found in your node_modules
W20161109-03:53:42.862(1)? (STDERR) directory. Please run the following command to install it:
W20161109-03:53:42.863(1)? (STDERR)
W20161109-03:53:42.863(1)? (STDERR) meteor npm install --save babel-runtime
[...]
我照我说的尝试尝试安装babel-runtime
软件包.服务器设法成功启动,但随后在运行时引发以下错误:
Uncaught Error: Cannot find module 'babel-runtime/helpers/slicedToArray'
at Function.require.resolve
这一切仍在一个新创建的项目上进行,没有安装任何额外的软件包或更改代码.我曾尝试在网上寻找解决方案,但是尽管有很多关于已修复的错误的引用,但我什么都没找到.几个(问题)[ Babel-错误:找不到StackOverflow上的模块'babel-runtime/helpers/typeof'提出了以下建议:
-
重新安装NPM模块 rm -rf node_modules 流星npm install
-
更新NPM 流星npm更新-g npm
我正在使用Meteor 1.4.2,NPM 3.10.9,Ubuntu 16.04.1.
我遇到了同样的问题.经过一番挖掘,发现了以下内容: 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
升级到1.4.2.1-rc.1(然后在今天11/9早晨升级到1.4.2.1)之后,该错误已解决.
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 project, trying to follow another tutorial (for an older version of Meteor). Somewhere along the line, Meteor started throwing up obscure errors. After trying to start fresh again, I ended up reinstalling Meteor and it stopped complaining.
However, I'm getting the same problems, again. Specifically, after creating a brand new project:
meteor create myproject
cd myproject
meteor
The server throws up the following error:
[...]
W20161109-03:53:42.862(1)? (STDERR) Error: The babel-runtime npm package could not be found in your node_modules
W20161109-03:53:42.862(1)? (STDERR) directory. Please run the following command to install it:
W20161109-03:53:42.863(1)? (STDERR)
W20161109-03:53:42.863(1)? (STDERR) meteor npm install --save babel-runtime
[...]
I do what I'm told and attempt to install babel-runtime
package. The server manages to successfully get off the ground, but it then throws up the following error at run-time:
Uncaught Error: Cannot find module 'babel-runtime/helpers/slicedToArray'
at Function.require.resolve
This is all still working off a freshly created project, with no extra packages installed or code changed. I have tried looking online for solutions but, while there are lots of references to bugs that have been fixed, I haven't found anything. A couple of (questions)[Babel - Error: Cannot find module 'babel-runtime/helpers/typeof' on StackOverflow have suggested the following:
Reinstalling the NPM modules rm -rf node_modules meteor npm install
Updating NPM meteor npm update -g npm
I am using Meteor 1.4.2, NPM 3.10.9, Ubuntu 16.04.1.
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.
这篇关于尝试提供Meteor应用时出现"babel-runtime"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!