Skip to content

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

Closed

Description

@alanrsoares

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

Activity

  1. MitMaro commented on Apr 10, 2015

    @MitMaro

    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

  2. MitMaro commented on Apr 10, 2015

    @MitMaro

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

  3. alanrsoares commented on Apr 10, 2015

    @alanrsoares
    Author

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

  4. claydiffrient commented on Apr 10, 2015

    @claydiffrient

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions