My code works properly on windows, but I got an error on mac ox
I am using the newest babel 6.x
and here are the error ouputs:
Version: webpack 1.12.6
Time: 1321ms
Asset Size Chunks Chunk Names
basic/js/bundle.js 10.3 kB 0, 1 basic
js/common.js 23.2 kB 1 js/common.js
chunk {0} basic/js/bundle.js (basic) 7.65 kB {1} [rendered]
[0] multi basic 40 bytes {0} [built] [1 error]
[2] ../~/webpack-hot-middleware/client.js 3.24 kB {0} [built]
[3] ../~/webpack/buildin/module.js 251 bytes {0} [built]
[4] ../~/webpack-hot-middleware/~/strip-ansi/index.js 161 bytes {0} [built]
[5] ../~/webpack-hot-middleware/~/strip-ansi/~/ansi-regex/index.js 145 bytes {0} [built]
[6] ../~/webpack-hot-middleware/client-overlay.js 883 bytes {0} [built]
[7] ../~/webpack-hot-middleware/process-update.js 2.93 kB {0} [built]
chunk {1} js/common.js (js/common.js) 0 bytes [rendered]
ERROR in ./src/exseed_contrib_basic/flux/boot.js
Module build failed: TypeError: Cannot read property '__esModule' of null
at Function.normalisePlugin (/Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/file/options/option-manager.js:156:20)
at /Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/file/options/option-manager.js:197:30
at Array.map (native)
at Function.normalisePlugins (/Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/file/options/option-manager.js:173:20)
at OptionManager.mergeOptions (/Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/file/options/option-manager.js:271:36)
at OptionManager.init (/Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10)
at File.initOptions (/Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/file/index.js:190:75)
at new File (/Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/file/index.js:121:22)
at Pipeline.transform (/Users/gocreating/projects/exseed/node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at transpile (/Users/gocreating/projects/exseed/node_modules/babel-loader/index.js:14:22)
at /Users/gocreating/projects/exseed/node_modules/babel-loader/lib/fs-cache.js:140:16
at /Users/gocreating/projects/exseed/node_modules/babel-loader/lib/fs-cache.js:27:23
at fs.js:263:20
at FSReqWrap.oncomplete (fs.js:95:15)
@ multi basic
The file boo.js
which caused the weird error:
import React from 'react';
import { render } from 'react-dom';
import Routes from '../routes';
render(<Routes />, document.getElementById('exseed_root'));
This file only contains 4 lines of codes, but it still showed error even when I switched to es5 syntax…
I encountered this problem today, then I tried to debug the option-manager.js, and I find the cause of the problem is that the babel-loader.plugins array contained a null value in the webpack.config.js file.
Like this
Changed