Babel compiler error after upgrading to meteor 1.6.1.1


#1

Hi,

We were running on meteor 1.5.1 so upgraded to 1.6.1.1. The update had problem with uglify but we fixed that creating a local package & changing the babel version constraint.

After that the update was completed. When I start server I see errors related to ecmascript package as below:

=> Started proxy.
=> Errors prevented startup:

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

   C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\types\lib\definitions\utils.js:138:13:
   Property arguments[0] of CallExpression expected node to be of a type ["Expression","SpreadElement","JSXNamespacedName"] but
   instead got "JSXIdentifier"
   at validate
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\types\lib\definitions\utils.js:138:13)
   at validator
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\types\lib\definitions\utils.js:97:7)
   at Object.validate
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\types\lib\definitions\utils.js:193:10)
   at validate
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\types\lib\validators\validate.js:17:9)
   at builder
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\types\lib\builders\builder.js:50:27)
   at Object.CallExpression
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\types\lib\builders\generated\index.js:283:27)
   at PluginPass.JSXElement (C:\project-code\project\node_modules\babel-plugin-transform-react-inline-elements\lib\index.js:81:20)
   at newFn
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\visitors.js:243:21)
   at NodePath._call
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:65:18)
   at NodePath.call
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:40:17)
   at NodePath.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:100:12)
   at TraversalContext.visitQueue
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:144:16)
   at TraversalContext.visitMultiple
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:99:17)
   at TraversalContext.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:183:19)
   at Function.traverse.node
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\index.js:106:17)
   at NodePath.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:107:18)
   at TraversalContext.visitQueue
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:144:16)
   at TraversalContext.visitQueue
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:150:21)
   at TraversalContext.visitSingle
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:104:19)
   at TraversalContext.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:185:19)
   at Function.traverse.node
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\index.js:106:17)
   at NodePath.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:107:18)
   at TraversalContext.visitQueue
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:144:16)
   at TraversalContext.visitSingle
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:104:19)
   at TraversalContext.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:185:19)
   at Function.traverse.node
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\index.js:106:17)
   at NodePath.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:107:18)
   at TraversalContext.visitQueue
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:144:16)
   at TraversalContext.visitMultiple
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:99:17)
   at TraversalContext.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:183:19)
   at Function.traverse.node
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\index.js:106:17)
   at NodePath.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:107:18)
   at TraversalContext.visitQueue
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:144:16)
   at TraversalContext.visitMultiple
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:99:17)
   at TraversalContext.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:183:19)
   at Function.traverse.node
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\index.js:106:17)
   at NodePath.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\path\context.js:107:18)
   at TraversalContext.visitQueue
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:144:16)
   at TraversalContext.visitSingle
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:104:19)
   at TraversalContext.visit
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\context.js:185:19)
   at Function.traverse.node
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\index.js:106:17)
   at traverse
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\traverse\lib\index.js:76:12)
   at transformFile
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transformation\index.js:116:29)
   at runSync
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transformation\index.js:45:3)
   at transformFromAstSync
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transform-ast-sync.js:18:38)
   at Object.transformFromAst
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\@babel\core\lib\transform-ast.js:22:68)
   at transform
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:71:30)
   at compile
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:82:14)
   at Cache.Cp.get
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\cache.js:101:26)
   at Object.compile
   (C:\Users\A\AppData\Local\.meteor\packages\ecmascript\0.10.7\plugin.compile-ecmascript.os\npm\node_modules\meteor\babel-compiler\node_modules\meteor-babel\index.js:46:23)
   at Object.compile (packages/babel-compiler.js:51:29)
   at packages/babel-compiler.js:184:22
   at Function.time (C:\tools\tool-env\profile.js:305:10)
   at profile (packages/babel-compiler.js:232:20)
   at BabelCompiler.BCp.processOneFileForTarget (packages/babel-compiler.js:183:20)
   at BabelCompiler.<anonymous> (packages/babel-compiler.js:111:26)
   at Array.forEach (<anonymous>)
   at BabelCompiler.BCp.processFilesForTarget (packages/babel-compiler.js:110:14)

Can someone please help or point us to a solution?

The error we are facing is somewhat similar to this.

Thanks


#2

Have you updated babel as per the upgrade instructions?


Meteor 1.6.1.1 rendering a blank page with SSR
#3

@robfallows thank you for helping.
I had not updated babel. So updated babel to the latest version using:

meteor npm install @babel/runtime@latest

I also had some babel plugins being used, of which transform-react-inline-elements was shown in the error logs. So updated my .babelrc for it like below referring this article:

@babel/plugin-transform-react-inline-elements

After this, startup was clean. Working further on runtime errors :grinning:

Thanks again.


Meteor 1.6.1.1 client app fails with Package.modules undefined using --production