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

Cannot find config file after upgrading from 1.7.x to 1.8.x #964

Closed
alanrsoares opened this issue Apr 10, 2015 · 4 comments
Closed

Cannot find config file after upgrading from 1.7.x to 1.8.x #964

alanrsoares opened this issue Apr 10, 2015 · 4 comments

Comments

@alanrsoares
Copy link

Right after updating to 1.8, the arbitrary path to webpack.config.js cannot be resolved, throwing a module not found exception.

In my case, all my configurations files live under a config folder, eg: config/webpack.config.js and config/webpack.config.js.

And I call webpack through the CLI:

./node_modules/.bin/webpack --config config/webpack.dist.config.js --progress -p
@MitMaro
Copy link

MitMaro commented Apr 10, 2015

Some additional information:

$ webpack --config webpack.test.js
module.js:324
    throw err;
          ^
Error: Cannot find module 'webpack.test.js'
    at Function.Module._resolveFilename (module.js:322:15)
    at Function.Module._load (module.js:264:25)
    at Module.require (module.js:351:17)
    at require (module.js:370:17)
    at module.exports (/Users/mitmaro/Code/ComboKeysContext/node_modules/webpack/bin/convert-argv.js:56:12)
    at Object.<anonymous> (/Users/mitmaro/Code/ComboKeysContext/node_modules/webpack/bin/webpack.js:56:40)
    at Module._compile (module.js:446:26)
    at Object.Module._extensions..js (module.js:464:10)
    at Module.load (module.js:341:32)
    at Function.Module._load (module.js:296:12)

Edit: Pasted the wrong stack trace

@MitMaro
Copy link

MitMaro commented Apr 10, 2015

Rolling back to version 1.8.2 from 1.8.3 fixes the problem for me.

@alanrsoares
Copy link
Author

I'm gonna stick with 1.7.x till there's a patch for this issue.

@claydiffrient
Copy link

For me, if my file is named webpack.config.js it works. If I try passing it in such as webpack --config webpack.development.js it throws the Cannot find module error.

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

3 participants