Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors from .babelrc after updating to Meteor 1.6.1-beta #9469

Closed
Themandunord opened this issue Dec 13, 2017 · 9 comments
Closed

Errors from .babelrc after updating to Meteor 1.6.1-beta #9469

Themandunord opened this issue Dec 13, 2017 · 9 comments
Assignees
Milestone

Comments

@Themandunord
Copy link

Themandunord commented Dec 13, 2017

Hi guys,

Since I updated my app to 1.6.1-beta.x I can't launch my app and test the PR #9263.

I test with some beta of the 1.6.1 beta always the same issue.
With the latest version (1.6.1-beta.18) I have this error :

=> Errors prevented startup:

   While processing files with ecmascript (for target web.browser):

   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\options.js:59:13:
   [BABEL] lib/collections/index.js: .env is not allowed in preset options
   at
   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\options.js:59:13
   at Array.forEach (<anonymous>)
   at validate
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\options.js:57:21)
   at
   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:413:36
   at cachedFunction
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\caching.js:40:17)
   at loadPresetDescriptor
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:402:10)
   at
   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:53:17
   at Array.map (<anonymous>)
   at OptionManager.mergeOptions
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:51:34)
   at OptionManager.mergeConfigChain
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:92:10)
   at OptionManager.init
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:114:12)
   at manageOptions
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:33:30)
   at loadConfig
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\index.js:15:37)
   at transformFromAstSync
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transform-ast-sync.js:13:36)
   at Object.transformFromAst
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transform-ast.js:20:68)
   at transform
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:53:30)
   at compile
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:73:14)
   at Cache.Cp.get
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\cache.js:101:26)
   at Object.compile
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:28:23)
   at Object.compile (packages/babel-compiler.js:51:29)
   at packages/babel-compiler.js:186:22
   at Function.time (C:\tools\tool-env\profile.js:305:10)
   at profile (packages/babel-compiler.js:229:20)
   at BabelCompiler.BCp.processOneFileForTarget (packages/babel-compiler.js:185:20)
   at BabelCompiler.<anonymous> (packages/babel-compiler.js:111:26)
   at Array.forEach (<anonymous>)
   at BabelCompiler.BCp.processFilesForTarget (packages/babel-compiler.js:110:14)


   While processing files with ecmascript (for target os.windows.x86_64):

   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\options.js:59:13:
   [BABEL] lib/collections/index.js: .env is not allowed in preset options
   at
   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\options.js:59:13
   at Array.forEach (<anonymous>)
   at validate
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\options.js:57:21)
   at
   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:413:36
   at cachedFunction
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\caching.js:40:17)
   at loadPresetDescriptor
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:402:10)
   at
   C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:53:17
   at Array.map (<anonymous>)
   at OptionManager.mergeOptions
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:51:34)
   at OptionManager.mergeConfigChain
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:92:10)
   at OptionManager.init
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:114:12)
   at manageOptions
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\option-manager.js:33:30)
   at loadConfig
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\config\index.js:15:37)
   at transformFromAstSync
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transform-ast-sync.js:13:36)
   at Object.transformFromAst
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transform-ast.js:20:68)
   at transform
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:53:30)
   at compile
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:73:14)
   at Cache.Cp.get
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\cache.js:101:26)
   at Object.compile
   (C:\Users\plesp\AppData\Local\.meteor\packages\ecmascript\0.10.0-beta161.14\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:28:23)
   at Object.compile (packages/babel-compiler.js:51:29)
   at packages/babel-compiler.js:186:22
   at Function.time (C:\tools\tool-env\profile.js:305:10)
   at profile (packages/babel-compiler.js:229:20)
   at BabelCompiler.BCp.processOneFileForTarget (packages/babel-compiler.js:185:20)
   at BabelCompiler.<anonymous> (packages/babel-compiler.js:111:26)
   at Array.forEach (<anonymous>)
   at BabelCompiler.BCp.processFilesForTarget (packages/babel-compiler.js:110:14)


=> Your application has errors. Waiting for file change.

You can reproduct this issue with my kickstarter project : https:/Themandunord/Mantra-Kickstarter-2.

Run meteor to see the error.

Thanks !

@Themandunord Themandunord changed the title Can start a 1.6.1-beta app Can't start a 1.6.1-beta app Dec 13, 2017
@Themandunord Themandunord changed the title Can't start a 1.6.1-beta app Can't start an 1.6.1-beta app Dec 13, 2017
@benjamn
Copy link
Contributor

benjamn commented Dec 13, 2017

Meteor 1.6.1 has switched from Babel 6 to Babel 7, so it may be time to revisit the contents of your .babelrc file(s), since many plugins have new versions (or even new @babel/... names) to work with Babel 7.

@Themandunord
Copy link
Author

Themandunord commented Dec 13, 2017

Oh !
So I need to update my babel plugin from my package.json ? Refactor .babelrc ?
Babel packages from meteor are ok ?

I can't find any solution...
My babelrc looks like that :

{
  "presets": [
    "es2015",
    "stage-2",
    "react"
  ],
  "plugins": [
    "react-require",
    "babel-root-slash-import",
    ["import", { "libraryName": "antd" }]
  ]
}

react-require plugin and babel-root-slash-import plugin don't have new versions...

EDIT: I install @babel/runtime, @babel/preset-env,.... and in my babelrc :

{
  "presets": [
    "@babel/preset-env",
    "@babel/preset-stage-2",
    "@babel/preset-react"
  ],
  "plugins": [
    "react-require",
    "babel-root-slash-import",
    ["import", { "libraryName": "antd" }]
  ]
}
 

When I launch meteor I have :

Warning: unable to resolve "@babel/preset-env" in presets of /C/DEV/Mantra Kickstarter 2/.babelrc
Warning: unable to resolve "@babel/preset-stage-2" in presets of /C/DEV/Mantra Kickstarter 2/.babelrc
Warning: unable to resolve "@babel/preset-react" in presets of /C/DEV/Mantra Kickstarter 2/.babelrc
=> Started MongoDB.
W20171213-23:56:36.663(1)? (STDERR) C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:472
W20171213-23:56:36.719(1)? (STDERR) }).run();
W20171213-23:56:36.719(1)? (STDERR)    ^
W20171213-23:56:36.719(1)? (STDERR)
W20171213-23:56:36.720(1)? (STDERR) Error: The @babel/runtime npm package could not be found in your node_modules
W20171213-23:56:36.720(1)? (STDERR) directory. Please run the following command to install it:
W20171213-23:56:36.720(1)? (STDERR)
W20171213-23:56:36.720(1)? (STDERR)   meteor npm install --save @babel/runtime
W20171213-23:56:36.721(1)? (STDERR)
W20171213-23:56:36.721(1)? (STDERR)     at babel-runtime.js (packages\babel-runtime.js:27:9)
W20171213-23:56:36.721(1)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
W20171213-23:56:36.722(1)? (STDERR)     at require (packages\modules-runtime.js:238:16)
W20171213-23:56:36.722(1)? (STDERR)     at packages\babel-runtime.js:146:15
W20171213-23:56:36.722(1)? (STDERR)     at packages\babel-runtime.js:153:3
W20171213-23:56:36.722(1)? (STDERR)     at infos.forEach.info (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:415:13)
W20171213-23:56:36.723(1)? (STDERR)     at Array.forEach (<anonymous>)
W20171213-23:56:36.723(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:414:9W20171213-23:56:36.723(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:468:5W20171213-23:56:36.724(1)? (STDERR)     at Function.run (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\profile.js:510:12)
=> Exited with code: 1
W20171213-23:56:44.126(1)? (STDERR) C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:472
W20171213-23:56:44.127(1)? (STDERR) }).run();
W20171213-23:56:44.127(1)? (STDERR)    ^
W20171213-23:56:44.127(1)? (STDERR)
W20171213-23:56:44.128(1)? (STDERR) Error: The @babel/runtime npm package could not be found in your node_modules
W20171213-23:56:44.128(1)? (STDERR) directory. Please run the following command to install it:
W20171213-23:56:44.129(1)? (STDERR)
W20171213-23:56:44.129(1)? (STDERR)   meteor npm install --save @babel/runtime
W20171213-23:56:44.129(1)? (STDERR)
W20171213-23:56:44.130(1)? (STDERR)     at babel-runtime.js (packages\babel-runtime.js:27:9)
W20171213-23:56:44.130(1)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
W20171213-23:56:44.130(1)? (STDERR)     at require (packages\modules-runtime.js:238:16)
W20171213-23:56:44.131(1)? (STDERR)     at packages\babel-runtime.js:146:15
W20171213-23:56:44.131(1)? (STDERR)     at packages\babel-runtime.js:153:3
W20171213-23:56:44.132(1)? (STDERR)     at infos.forEach.info (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:415:13)
W20171213-23:56:44.132(1)? (STDERR)     at Array.forEach (<anonymous>)
W20171213-23:56:44.132(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:414:9W20171213-23:56:44.133(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:468:5W20171213-23:56:44.133(1)? (STDERR)     at Function.run (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\profile.js:510:12)
=> Exited with code: 1
W20171213-23:56:49.107(1)? (STDERR) C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:472
W20171213-23:56:49.108(1)? (STDERR) }).run();
W20171213-23:56:49.109(1)? (STDERR)    ^
W20171213-23:56:49.110(1)? (STDERR)
W20171213-23:56:49.110(1)? (STDERR) Error: The @babel/runtime npm package could not be found in your node_modules
W20171213-23:56:49.110(1)? (STDERR) directory. Please run the following command to install it:
W20171213-23:56:49.111(1)? (STDERR)
W20171213-23:56:49.111(1)? (STDERR)   meteor npm install --save @babel/runtime
W20171213-23:56:49.111(1)? (STDERR)
W20171213-23:56:49.112(1)? (STDERR)     at babel-runtime.js (packages\babel-runtime.js:27:9)
W20171213-23:56:49.112(1)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:343:9)
W20171213-23:56:49.113(1)? (STDERR)     at require (packages\modules-runtime.js:238:16)
W20171213-23:56:49.113(1)? (STDERR)     at packages\babel-runtime.js:146:15
W20171213-23:56:49.115(1)? (STDERR)     at packages\babel-runtime.js:153:3
W20171213-23:56:49.115(1)? (STDERR)     at infos.forEach.info (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:415:13)
W20171213-23:56:49.115(1)? (STDERR)     at Array.forEach (<anonymous>)
W20171213-23:56:49.116(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:414:9W20171213-23:56:49.117(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:468:5W20171213-23:56:49.117(1)? (STDERR)     at Function.run (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\profile.js:510:12)
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

But I have @babel/runtime...

"dependencies": {
    "antd": "^3.0.1",
    "bcrypt": "^1.0.3",
    "i18next": "^9.0.0",
    "i18next-browser-languagedetector": "^2.0.0",
    "i18next-localstorage-cache": "^1.1.1",
    "mantra-core": "^1.7.0",
    "react": "^15.6.2",
    "react-dom": "^15.6.2",
    "react-komposer": "^1.3.0",
    "react-mounter": "^1.0.0",
    "react-router": "^4.2.0",
    "react-router-dom": "^4.2.2",
    "react-simple-di": "^1.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0-beta.34",
    "@babel/preset-env": "7.0.0-beta.34",
    "@babel/preset-react": "^7.0.0-beta.34",
    "@babel/preset-stage-2": "^7.0.0-beta.34",
    "@babel/runtime": "^7.0.0-beta.34",
    "@storybook/react": "3.2.7",
    "babel-plugin-import": "^1.6.3",
    "babel-plugin-react-require": "3.x.x",
    "babel-root-slash-import": "1.x.x",
    "chai": "3.x.x",
    "enzyme": "^2.4.0",
    "eslint": "3.5.x",
    "eslint-plugin-react": "4.3.x",
    "jsdom": "^8.0.4",
    "mocha": "2.x.x",
    "react-addons-test-utils": "^15.6.2",
    "sinon": "1.17.x"
  }

@benjamn
Copy link
Contributor

benjamn commented Dec 13, 2017

That's right, if you didn't have a .babelrc file, you wouldn't be seeing this error, but of course some of those plugins are probably useful.

From looking at your reproduction, I believe you can remove the presets property from .babelrc, since Meteor uses equivalent presets by default, including react. If you find you're missing a plugin, you can always add it later.

If you see an error when you run the app saying you need to install the @babel/runtime package, just follow those instructions.

Thanks for trying the 1.6.1 beta. Hope this helps!

@Themandunord
Copy link
Author

Themandunord commented Dec 14, 2017

Hi @benjamn,

So with this babelrc my app has launched.

{
  "plugins": [
    "react-require",
    "babel-root-slash-import",
  ]
}

But I have an other issue and I don't know if it's related with the 1.6.1-beta.

On my first load with this babelrc, I have this error :

W20171214-14:17:03.743(1)? (STDERR) C:\Users\plesp\AppData\Local\.meteor\packages\meteor-tool\1.6.1-beta.18\mt-os.windows.x86_64\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20171214-14:17:03.744(1)? (STDERR)                                             throw(ex);
W20171214-14:17:03.744(1)? (STDERR)                                             ^
W20171214-14:17:03.745(1)? (STDERR)
W20171214-14:17:03.745(1)? (STDERR) TypeError: Class constructor Collection cannot be invoked without 'new'
W20171214-14:17:03.746(1)? (STDERR)     at new _0x51eex8.(anonymous function) (packages\meteortoys_toykit.js:29:7185)
W20171214-14:17:03.746(1)? (STDERR)     at packages\meteortoys_toykit.js:29:8823
W20171214-14:17:03.746(1)? (STDERR)     at packages\meteortoys_toykit.js:32:4
W20171214-14:17:03.747(1)? (STDERR)     at packages\meteortoys_toykit.js:40:3
W20171214-14:17:03.747(1)? (STDERR)     at infos.forEach.info (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:415:13)
W20171214-14:17:03.748(1)? (STDERR)     at Array.forEach (<anonymous>)
W20171214-14:17:03.748(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:414:9W20171214-14:17:03.749(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:468:5W20171214-14:17:03.749(1)? (STDERR)     at Function.run (C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\profile.js:510:12)
W20171214-14:17:03.750(1)? (STDERR)     at C:\DEV\Mantra Kickstarter 2\.meteor\local\build\programs\server\boot.js:467:11

So I remove the package msavin:mongol and my app was succesfully launched.

It's an error with meteor ? mongol package ? Babel ?

Thanks :)

@benjamn
Copy link
Contributor

benjamn commented Dec 14, 2017

With native ECMAScript classes, it's forbidden to invoke a constructor like Collection without the new keyword. There was no easy way to detect this using Babel-compiled code, so it wasn't an obvious error before now. This error is very clearly part of the actual specification, so the affected code should be updated to use new (there's no other workaround, besides continuing to compile class syntax with Babel).

The whole idea of Babel is to let you start writing code that will one day be natively supported, with a smooth transition from compiled code to native support. For the most part, that promise really does hold, but there are a few differences that crop up from time to time. Rather than assigning blame to Babel, I would just take this as an opportunity to appreciate the quality of the illusion that Babel is able to provide in almost all cases (with just a few exceptions, like this one).

@Themandunord
Copy link
Author

Thanks for your reply @benjamn 👍
So I'll post to the package's repo to have an update from the author.

But one question. This new release (1.6.1) will break many packages and plugins, won't it ?

@benjamn
Copy link
Contributor

benjamn commented Dec 14, 2017

Custom Babel plugins in .babelrc files were always a bit of a gamble, compared to the core set of plugins that Meteor provides. How much is broken will depend on how many extra plugins are used, and whether or not those plugins are actively maintained. If you're using plugins that only sort of work by accident (which is unfortunately often the case with custom Babel configurations), any major infrastructure updates could cause problems.

This is not a Meteor problem as much as it is a reflection of the complexity of configuring Babel plugins. I don't envy the Babel team's position: they want it to seem easy to create high-quality, robust plugins, but there are many, many opportunities to get it wrong.

@Themandunord
Copy link
Author

For information,

https:/Themandunord/Mantra-Kickstarter-2/ my boilerplate works again :)

Other problems are not related to Meteor so I close this issue 👍

I have many problems to setup a storybook configuration and mocha configuration with Babel 7...

Thanks for all your informations @benjamn 👍

@benjamn benjamn added this to the Release 1.6.1 milestone Dec 20, 2017
@benjamn
Copy link
Contributor

benjamn commented Dec 20, 2017

@Themandunord You're very welcome!

I'm going to reopen this temporarily, and put it in the 1.6.1 milestone, just because I think there are a few things we can do to make this update easier. For example, I think we may be able to prevent the original .env is not allowed in preset options error.

@benjamn benjamn reopened this Dec 20, 2017
@benjamn benjamn changed the title Can't start an 1.6.1-beta app Errors from .babelrc after updating to Meteor 1.6.1-beta Dec 20, 2017
@benjamn benjamn self-assigned this Dec 20, 2017
benjamn pushed a commit that referenced this issue Dec 20, 2017
Helps with #9469, since any extraneous "env" property will be removed from
the copied object.
benjamn pushed a commit that referenced this issue Dec 20, 2017
Helps with #9469, since any extraneous "env" property will be removed from
the copied object.
@benjamn benjamn closed this as completed Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants