Glasnhost
Glasnhost

Reputation: 1135

ng serve broken: webpack

I created a new angular2 app with ng new, but on ng serve I get:

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

googled a lot and uninstalled/installed several times offending packages with no result. I want to UNDERSTAND this, in order to solve it, rather than applying recipes.

ng version is

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.14
node: 7.4.0
os: darwin x64

npm list --depth=0

UNMET PEER DEPENDENCY @angular/[email protected]
UNMET PEER DEPENDENCY @angular/[email protected]
UNMET PEER DEPENDENCY @angular/[email protected]
UNMET PEER DEPENDENCY @angular/[email protected]

npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]

I tried several times to un/in/stall UNMEET PEER DEPENDENCY manually, nothing changed. I have locally:

├── [email protected]

├── [email protected]

First time with npm, no experience...any suggestion welcome

I've followed https://github.com/angular/angular-cli/issues/2234 giving

npm uninstall webpack --save-dev
npm install [email protected] --save-dev

and now I get

ng serve
** NG Live Development Server is running on http://localhost:4200. **
webpack.validateSchema is not a function
TypeError: webpack.validateSchema is not a function

and server goes down

Upvotes: 1

Views: 926

Answers (1)

Yuri
Yuri

Reputation: 4488

I'd suggest building a "new" Angular 2 app on a recent angular-cli version instead of the 1.0.0-beta.14. There has been a RC version already.

Upvotes: 1

Related Questions