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

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

Open
22Viig opened this issue Feb 3, 2017 · 2 comments

Comments

@22Viig
Copy link

22Viig commented Feb 3, 2017

Following the readme guide and launching lektor with lektor server -f webpack it returns the following error:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.resolve has an unknown property 'modulesDirectories'. These properties are valid:
   object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
 - configuration.resolve.extensions[0] should not be empty.
@StefanYohansson
Copy link

seems like readme example was wrote before webpack 2.x.
So npm install --save-dev command install latest webpack version and webpack 2.x has a different api. You need to change:

resolve: {
  modulesDirectories: [...]
}

to something like this:

resolve: {
  modules: [...]
}

(maybe this solution leads to another problem)
I think the best way is to fix the right version on npm install command.

@obestwalter
Copy link
Contributor

As @StefanYohansson mentioned already this is a web pack two issue and can be resolved for the time being with version pinning. See: #14

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