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

Everything was working fine and suddenly these errors. #1019

Closed
kodeine opened this issue Sep 20, 2016 · 12 comments
Closed

Everything was working fine and suddenly these errors. #1019

kodeine opened this issue Sep 20, 2016 · 12 comments

Comments

@kodeine
Copy link

kodeine commented Sep 20, 2016

hello,
everything was working fine and suddenly i cant start the hmr server.
Any idea's?

UPDATE
so it seems like i changed "^webpack": "2.1.0-beta.21" to "webpack": "2.1.0-beta.21", and it works, looks like webpack": "2.1.0-beta.23 does not work with material2 branch.

OLD

/Projects/SL/website$ npm start

> angular2-webpack-starter@5.0.5 start /Projects/SL/website
> npm run server:dev


> angular2-webpack-starter@5.0.5 server:dev /Projects/SL/website
> webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/


/Projects/SL/website/node_modules/webpack/lib/webpack.js:16
        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 '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 'modulesDirectories'. 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 (/Projects/SL/website/node_modules/webpack/lib/webpack.js:16:9)
    at processOptions (/Projects/SL/website/node_modules/webpack-dev-server/bin/webpack-dev-server.js:263:13)
    at Object.<anonymous> (/Projects/SL/website/node_modules/webpack-dev-server/bin/webpack-dev-server.js:283:1)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "server:dev"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@5.0.5 server:dev: `webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular2-webpack-starter@5.0.5 server:dev script 'webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server --config config/webpack.dev.js --progress --profile --watch --content-base src/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Projects/SL/website/npm-debug.log

npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@5.0.5 start: `npm run server:dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular2-webpack-starter@5.0.5 start script 'npm run server:dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run server:dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Projects/SL/website/npm-debug.log
@scottopherson
Copy link

@kodeine looks like something broke with webpack@2.1.0-beta.23. Haven't dug into the issue yet but downgrading to 2.1.0-beta.22 got me past the error.

@kodeine
Copy link
Author

kodeine commented Sep 20, 2016

@scottopherson yeah i downgraded to beta22 as well and it works.

@matthewsorenson-tr
Copy link

matthewsorenson-tr commented Sep 20, 2016

@kunukn
Copy link

kunukn commented Sep 20, 2016

I had same issue, this fixed it

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

@aavelyn
Copy link

aavelyn commented Sep 20, 2016

I'm having this exact same error with tslint but it's form a vanilla downloaded angular2-webpack-starter with beta21

@lgarro
Copy link

lgarro commented Sep 20, 2016

Same issue:

node -v : 6.6.0
npm -v : 3.10.3

I get this same issue not locally but on codeship and heroku deploy process. No major changes besides the node version bump from 6.5 to 6.6 and added a few components, any ideas on how to fix.

I use a angular webpack starter version that uses "webpack": "^2.1.0-beta.21"

@matthewsorenson-tr
Copy link

@lgarro You'll likely encounter the issue locally if you run npm update. Try pinning webpack to a specific version (e.g. "webpack": "2.1.0-beta.21").

@lgarro
Copy link

lgarro commented Sep 20, 2016

That worked @matthewsorenson-tr thanks

@gaurav2887
Copy link

Is there any fix for this issue with 2.1.0-beta.23 instead of downgrading it to 2.1.0-beta.22?

@alvipeo
Copy link

alvipeo commented Sep 20, 2016

2.1.0-beta.24 is available ;)

@matthewsorenson-tr
Copy link

matthewsorenson-tr commented Sep 21, 2016

@gaurav2887 Update the webpack.*.js files to match the new format. There is a migration example at the end of the beta.23 release notes that may help with that: https://github.com/webpack/webpack/releases

@sqlsolver
Copy link

Using one of the new configuration option specified in the schema also solves the problem. For instance modulesDirectories has changed to simply modules in the later betas. Webpack issue #3018 has an interesting discussion around whether this should have been made a breaking change.

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

10 participants