angular / angular-cli

CLI tool for Angular

Home Page:https://cli.angular.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack v2.1.0-beta.23 breaks everything

JohannesHoppe opened this issue · comments

In short, please pin the webpack version to v2.1.0-beta.22.
beta 23 has breaking changes: https://github.com/webpack/webpack/releases/tag/v2.1.0-beta.23
PR follows soon!

....

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Windows
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.14
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    ng new foo-bar
    npm start
  4. The log given by the failure. Normally this include a stack trace and some
    more information.
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration has an unknown property 'tslint'. These properties are valid:
   object { amd?, bail?, cache?, context?, devServer?, devtool?, entry, externals?, loader?, module?, name?, dependencies?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
 - configuration.module has an unknown property 'preLoaders'. These properties are valid:
   object { rules?, loaders?, noParse?, unknownContextRequest?, unknownContextRegExp?, unknownContextRecursive?, unknownContextCritical?, exprContextRequest?, exprContextRegExp?, exprContextRecursive?, exprContextCritical?, wrappedContextRegExp?, wrappedContextRecursive?, wrappedContextCritical? }
   Options affecting the normal modules (`NormalModuleFactory`).
 - configuration.node.global should be a boolean.
 - configuration.resolve has an unknown property 'root'. These properties are valid:
   object { modules?, descriptionFiles?, plugins?, mainFields?, aliasFields?, mainFiles?, extensions?, enforceExtension?, moduleExtensions?, enforceModuleExtension?, alias?, symlinks?, unsafeCache?, cachePredicate?, fileSystem?, resolver? }
 - configuration.resolve.extensions[0] should not be empty.
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration has an unknown property 'tslint'. These properties are valid:
   object { amd?, bail?, cache?, context?, devServer?, devtool?, entry, externals?, loader?, module?, name?, dependencies?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
 - configuration.module has an unknown property 'preLoaders'. These properties are valid:
   object { rules?, loaders?, noParse?, unknownContextRequest?, unknownContextRegExp?, unknownContextRecursive?, unknownContextCritical?, exprContextRequest?, exprContextRegExp?, exprContextRecursive?, exprContextCritical?, wrappedContextRegExp?, wrappedContextRecursive?, wrappedContextCritical? }
   Options affecting the normal modules (`NormalModuleFactory`).
 - configuration.node.global should be a boolean.
 - configuration.resolve has an unknown property 'root'. These properties are valid:
   object { modules?, descriptionFiles?, plugins?, mainFields?, aliasFields?, mainFiles?, extensions?, enforceExtension?, moduleExtensions?, enforceModuleExtension?, alias?, symlinks?, unsafeCache?, cachePredicate?, fileSystem?, resolver? }
 - configuration.resolve.extensions[0] should not be empty.
    at webpack (E:\Angular2Buch\angular2-workshop-devmedia\node_modules\webpack\lib\webpack.js:16:9)
    at Class.run (E:\Angular2Buch\angular2-workshop-devmedia\node_modules\angular-cli\tasks\serve-webpack.js:23:27)
    at E:\Angular2Buch\angular2-workshop-devmedia\node_modules\angular-cli\commands\serve.js:84:26
    at process._tickCallback (internal/process/next_tick.js:103:7)

Same problem here, creating an angular Project using ng new first-app, then trying to run with ng serve (no changes were made on the generated project):
OS: Windows 10
Version:
angular-cli: 1.0.0-beta.14
node: 6.6.0
os: win32 x64

Steps:
ng new first-app
cd first-app
ng serve

LOG:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration has an unknown property 'tslint'. These properties are valid:
    object { amd?, bail?, cache?, context?, devServer?, devtool?, entry, externals?, loader?, module?, name?, dependencies?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
  • configuration.module has an unknown property 'preLoaders'. These properties are valid:
    object { rules?, loaders?, noParse?, unknownContextRequest?, unknownContextRegExp?, unknownContextRecursive?, unknownContextCritical?, exprContextRequest?, exprContextRegExp?, exprContextRecursive?, exprContextCritical?, wrappedContextRegExp?, wrappedContextRecursive?, wrappedContextCritical? }
    Options affecting the normal modules (NormalModuleFactory).
  • configuration.node.global should be a boolean.
  • configuration.resolve has an unknown property 'root'. These properties are valid:
    object { modules?, descriptionFiles?, plugins?, mainFields?, aliasFields?, mainFiles?, extensions?, enforceExtension?, moduleExtensions?, enforceModuleExtension?, alias?, symlinks?, unsafeCache?, cachePredicate?, fileSystem?, resolver? }
  • configuration.resolve.extensions[0] should not be empty.

Same problem. Was trying to figure out why an existing project broke; created new using ng new test-app. ng build fails

OS: Windows 10 x64
angular-cli: 1.0.0-beta.14
node: 6.5.0

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration has an unknown property 'tslint'. These properties are valid:
   object { amd?, bail?, cache?, context?, devServer?, devtool?, entry, externals?, loader?, module?, name?, dependencies?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?
, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
 - configuration.module has an unknown property 'preLoaders'. These properties are valid:
   object { rules?, loaders?, noParse?, unknownContextRequest?, unknownContextRegExp?, unknownContextRecursive?, unknownContextCritical?, exprContextRequest?, exprContextRegExp?, exprContextRecursive?, exprConte
xtCritical?, wrappedContextRegExp?, wrappedContextRecursive?, wrappedContextCritical? }
   Options affecting the normal modules (`NormalModuleFactory`).
 - configuration.node.global should be a boolean.
 - configuration.resolve has an unknown property 'root'. These properties are valid:
   object { modules?, descriptionFiles?, plugins?, mainFields?, aliasFields?, mainFiles?, extensions?, enforceExtension?, moduleExtensions?, enforceModuleExtension?, alias?, symlinks?, unsafeCache?, cachePredica
te?, fileSystem?, resolver? }
 - configuration.resolve.extensions[0] should not be empty.

Same here.

Fedora 14
angular-cli: 1.0.0-beta.14
node: 5.9.1
os: linux x64

Same here.

same here!! please helps

Same here:

Mac OSX
angular-cli: 1.0.0-beta.14
node: 5.10.0
os: darwin x64

Yup, sorry to add to the noise but I'm getting the exact same error message on
angular-cli: 1.0.0-beta.14
node: 6.2.2
os: darwin x64

Sadly, I discovered this after I had gone through the tedious process of installing material components, angularfire, etc... Hope I don't have to ng new another app and start all over!

I know the issue was only filed an hour ago but I hope someone stops by to help soon!

@colindevs as a work around you can fix webpack to v2.1.0-beta.22 in your apps package.json

Thanks @colindevs - anyone using Laravel (laravel-elixir-webpack-official) just do:

npm uninstall webpack --save-dev

followed by

npm install webpack@2.1.0-beta.22 --save-dev

Then you should be able to gulp again. Fixed the issue for me.

Thanks @shusson, it's working fine now.

We'll have a release in the next day or so that fixes this issue. Until then, please see #2234 (comment) for a temporary fix.

I'm still having the issue even after the workaround.

angular-cli: 1.0.0-beta.14
node: 6.5.0
os: win32 x64 (Windows 10.0.10586)

I've been following the latest developments here yet I still have not had success getting a clean install to serve a project.

  • uninstall angular-cli
  • cleaned cache
  • reinstalled angular-cli
  • ng new
  • cd
  • ng serve
    and..
    Still receiving the Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. dump.
    These steps have been performed after the PR was merged in to pin the beta dependencies.

angular-cli: 1.0.0-beta.14
node: 4.4.5
os: darwin x64

@jasonhodges you need to fix the webpack version in your app to v2.1.0-beta.22.

To reiterate @shusson's fix which is up a bit: tweak your package.json

npm uninstall webpack --save-dev
npm install webpack@2.1.0-beta.22 --save-dev

ng build or ng serve will then work.

Thank you for reporting. This issue has been fixed and we're now working to get an updated beta to you right away.

Per the code of conduct for Angular, I’ve deleted a couple of comments that veered into trolling, and have locked this issue. Please keep issues and comments technical and constructive. We are working hard to deliver a large project of which webpack-CLI is one part; often we can’t act instantly to resolve an issue. We’re sorry for this regression and are working to resolve.

1.0.0-beta.15 is out now which fixes this issue.