It’s impossible to start any Meteor app with this combination because of the following error:
TypeError: Cannot read property '1' of null
at babel-runtime.js (packages/babel-runtime.js:51:13)
at fileEvaluate (packages/modules-runtime.js:322:7)
at Module.require (packages/modules-runtime.js:224:14)
at require (packages/modules-runtime.js:244:21)
at packages/babel-runtime.js:101:15
at packages/babel-runtime.js:108:3
at ./.meteor/local/build/programs/server/boot.js:411:36
at Array.forEach (<anonymous>)
at ./.meteor/local/build/programs/server/boot.js:220:19
at ./.meteor/local/build/programs/server/boot.js:471:5
The error is due to this code, which contains a subtle bug at packages/babel-runtime.js:51:13
:
var match = /^7\.0\.0-(beta|rc)\./.exec(babelRuntimeVersion);
if (match &&
match[1] === "rc" ||
(match[1] === "beta" &&
parseInt(babelRuntimeVersion.split(".").pop(), 10) > 55)) {
see it? It should read:
var match = /^7\.0\.0-(beta|rc)\./.exec(babelRuntimeVersion);
if (match &&
(
(match[1] === "rc") ||
(match[1] === "beta" && parseInt(babelRuntimeVersion.split(".").pop(), 10) > 55)
)
) {
// (might be better to write this as a condition that breaks exits early if 'match' does not exist..)
Meteor team: please fix this!
As an aside: I don’t actually want babel-compiler
in the project at all. We have an in-house web app and control the browsers that use the app. We don’t use any Node 8.10+ features. I couldn’t see any dependency on babel-compiler
in the project anywhere but it appears we are forced to use it for whatever reason, along with the associated bugs and slow compilation…
In any case, it would be awesome if the above bug could be fixed ASAP so we can build the app again.