jaszhix/tab-master-5000-extension

Build error

auxiliary opened this issue · 3 comments

I get the following build error when trying to gulp build, have you ever seen this?

/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:163
            if(isError) throw e;
                              ^
Error: ModuleBuildError: Module build failed: ReferenceError: [BABEL] /home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/react-modal/lib/index.js: Unknown option: /home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/react-modal/.babelrc.presets
    at Logger.error (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/logger.js:58:11)
    at OptionManager.mergeOptions (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29)
    at OptionManager.addConfig (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at File.initOptions (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/index.js:147:75)
    at new File (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/file/index.js:137:22)
    at Pipeline.transform (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/node_modules/babel-core/lib/transformation/pipeline.js:164:16)
    at transpile (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/index.js:12:22)
    at Object.module.exports (/home/mohammad/repos/tab-master-5000-chrome-extension/node_modules/babel-loader/index.js:71:12)

Node version: 0.10.28
npm version: 1.4.9

Ah, yes, just rename .babelrc.presets to _.babelrc.presets in /node_modules/react-modal/, and it should get past that error. That's happening because that library's babel file is overriding the project's configuration, and possibly uses a different version of babel/set of plugins.

Thanks for the hint. .babelrc.presets didn't exist. I renamed .babelrc to .babelrc.presets and it worked.

I see. No problem, glad it worked for you.