Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4 -- Webpack #304

Closed
stylesuxx opened this issue Nov 18, 2016 · 6 comments
Closed

V4 -- Webpack #304

stylesuxx opened this issue Nov 18, 2016 · 6 comments

Comments

@stylesuxx
Copy link
Contributor

stylesuxx commented Nov 18, 2016

V4, current master breaks with the newest webpack version.
The last working version is [email protected]

npm start       

> [email protected] start /home/chris/Projekte/testing/grw_1
> npm run serve:dev


> [email protected] serve:dev /home/chris/Projekte/testing/grw_1
> webpack-dev-server --open --env dev


/home/chris/Projekte/testing/grw_1/node_modules/webpack/lib/webpack.js:17
		throw new WebpackOptionsValidationError(webpackOptionsValidationErrors);
		^
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration has an unknown property 'debug'. These properties are valid:
   object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
   The 'debug' property was removed in webpack 2.
   Loaders should be updated to allow passing this option via loader options in module.rules.
   Until loaders are updated one can use the LoaderOptionsPlugin to switch loaders into debug mode:
   plugins: [
     new webpack.LoaderOptionsPlugin({
       debug: true
     })
   ]
 - configuration.module has an unknown property 'preLoaders'. These properties are valid:
   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, loaders?, noParse?, rules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp? }
   Options affecting the normal modules (`NormalModuleFactory`).
 - configuration.resolve.extensions[0] should not be empty.
    at webpack (/home/chris/Projekte/testing/grw_1/node_modules/webpack/lib/webpack.js:17:9)
    at Object.<anonymous> (/home/chris/Projekte/testing/grw_1/node_modules/webpack-dev-server/bin/webpack-dev-server.js:236:12)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:139:18)
    at node.js:999:3

See here stylesuxx/generator-react-webpack-redux#46 (comment)

FYI, I updated my fork and started working on fixing this.

Ah, webpack config is part of the template...

@stylesuxx stylesuxx changed the title V4 - Webpack V4 -- Webpack Nov 18, 2016
@sthzg
Copy link
Member

sthzg commented Nov 19, 2016

@stylesuxx thanks for reporting. It's side-tracked in the template repo react-webpack-generators/react-webpack-template#68 (comment), but unfortunately not published right now.

@gaboAcosta
Copy link

How can I use an older version of the scaffold, as is I can't work with this :(

@sthzg
Copy link
Member

sthzg commented Nov 20, 2016

@gaboAcosta how did you install the generator? I am curious, since npm install generator-react-webpack references the latest stable 3.x. line, which does not contain the error mentioned by @stylesuxx (it however suffers from #302, which will be resolved shortly)

@matty
Copy link

matty commented Nov 20, 2016

@sthzg I've just installed this generator and my React version is specified as "dependencies": { "core-js": "^2.0.0", "normalize.css": "^4.0.0", "react": "^15.0.0", "react-dom": "^15.0.0" }

v15.0.0. I am still getting the issue with #302 how can I get it running?

@sthzg
Copy link
Member

sthzg commented Nov 20, 2016

hi @matty, ^15.0.0 means that npm will install the latest 15.x release, so you will have 15.4.x installed. Until fixed, this workaround works great (it should be added to the alias object in cfg/base.js). For further discussion about #302 lets continue communication there, as this issue has a different scope.

@sthzg
Copy link
Member

sthzg commented Nov 22, 2016

Fixed and published to npm. Thanks @stylesuxx for the PR(s).

@sthzg sthzg closed this as completed Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants