Has anyone managed to add redux to core-ui start kit project?
I am planning to start a big project using this boilerplate and I need redux to manage the states as well as the react-router-redux and redux-saga.
I keep getting this error no matter what I do.
:npmSetup SKIPPED
:npmInstall UP-TO-DATE
:installGulp UP-TO-DATE
:gulp_build
[10:29:06] Using gulpfile /var/www/html/enonic/brazilexpress/gulpfile.js
[10:29:06] Starting ‘babelES6’…
[10:29:06] Starting ‘webpack-prod’…
[10:29:06] ‘webpack-prod’ errored after 127 ms
[10:29:06] Error: Breaking change: extract now only takes a single argument. Either an options object or the loader(s).
Example: if your old code looked like this:
ExtractTextPlugin.extract(‘style-loader’, ‘css-loader’)
You would change it to:
ExtractTextPlugin.extract({ notExtractLoader: ‘style-loader’, loader: ‘css-loader’ })
The available options are:
loader: string | object | loader
notExtractLoader: string | object | loader
publicPath: string
at Function.ExtractTextPlugin.extract (/var/www/html/enonic/brazilexpress/node_modules/extract-text-webpack-plugin/index.js:171:9)
at Object.<anonymous> (/var/www/html/enonic/brazilexpress/webpack.config.js:46:44)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Gulp.<anonymous> (/var/www/html/enonic/brazilexpress/gulpfile.js:30:27)
[10:29:06] Finished ‘babelES6’ after 345 ms
:gulp_build FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:gulp_build’.
Process ‘command ‘/var/www/html/enonic/brazilexpress/.gradle/nodejs/node-v6.9.4-linux-x64/bin/node’’ finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I don’t think it has anything to do with XP.
Seems like you are using Webpack and there’s a problem in your webpack.config.js file in a part where you are calling ExtractTextPlugin. There was a breaking change in one of the recent version of this plugin where they changed the syntax, so now you should pass just one argument with the config object. There’s even an example in the error message above. If you paste contents of your webpack config file here, I can try to suggest what you should change to make it work.
It saved me a lot of time by using the core-ui start kit.
The only drawback is that the kit hasn’t got the redux or redux-thunk or redux-saga libs included in it.
Who starts a big react project without having redux these days? It would be very handy if the start-kit came with these libs.
I started getting errors when I tried to include these libs in the project. It looks like that some of the packages are outdated and when you upgrade them you start getting all kind of errors.