Closed rahbari closed 6 years ago
Seeing same issue. Why was this closed?
We are also seeing this issue. Did you find a resolution @rahbari?
@rv-jbaker @JeffML The problem is babel core and some modules (Not babel-preset-minifiy) have new package names and you just don't get new version with npm update, for example:
"@babel/core": "^7.1.6",
"@babel/plugin-syntax-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
"babel-preset-minify": "^0.5.0",
Total mess :))
I'm having this issue as well.
17:25:50 - error: Compiling of app/article/component/HeadingMenu.js failed. TypeError: app/article/component/HeadingMenu.js: Cannot read property 'contexts' of null
at NodePath._getQueueContexts (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/context.js:278:21)
at NodePath._containerInsert (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/modification.js:94:23)
at NodePath._containerInsertBefore (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/modification.js:137:15)
at NodePath.insertBefore (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/modification.js:56:19)
at NodePath.unshiftContainer (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/modification.js:239:15)
at BuiltInReplacer.replace (/home/sean/bluetheme/node_modules/babel-plugin-minify-builtins/lib/index.js:164:22)
at PluginPass.exit (/home/sean/bluetheme/node_modules/babel-plugin-minify-builtins/lib/index.js:205:27)
at newFn (/home/sean/bluetheme/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/home/sean/bluetheme/node_modules/babel-traverse/lib/path/context.js:117:8)
at TraversalContext.visitQueue (/home/sean/bluetheme/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/home/sean/bluetheme/node_modules/babel-traverse/lib/context.js:108:19)
at TraversalContext.visit (/home/sean/bluetheme/node_modules/babel-traverse/lib/context.js:192:19)
at Function.traverse.node (/home/sean/bluetheme/node_modules/babel-traverse/lib/index.js:114:17)
at traverse (/home/sean/bluetheme/node_modules/babel-traverse/lib/index.js:79:12)
at File.transform (/home/sean/bluetheme/node_modules/babel-core/lib/transformation/file/index.js:516:35)
at /home/sean/bluetheme/node_modules/babel-core/lib/transformation/pipeline.js:50:19
at File.wrap (/home/sean/bluetheme/node_modules/babel-core/lib/transformation/file/index.js:532:16)
at Pipeline.transform (/home/sean/bluetheme/node_modules/babel-core/lib/transformation/pipeline.js:47:17)
at Promise (/home/sean/bluetheme/node_modules/babel-brunch/index.js:81:26)
at new Promise (<anonymous>:null:null)
at BabelCompiler.compile (/home/sean/bluetheme/node_modules/babel-brunch/index.js:77:12)
Disabling the "builtIn" plugin seems to suppress the error. I'm using brunch so here's my working config:
exports.plugins = {
babel: {
'presets': ['es2015'],
'env': {
'production': {
'presets': [['minify', {
'builtIns': false
}]]
}
}
},
};
After Updating to v0.5.0 I get a lot of errors while minifying single files: