Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Build failing with "Error: data['notExtractLoader'] should NOT have additional properties" - Is notExtractLoader still supported? #375

Closed
jgliner opened this issue Jan 29, 2017 · 8 comments

Comments

@jgliner
Copy link

jgliner commented Jan 29, 2017

Hi, my build has been failing for the past day or two. I have tried updating to the latest version (rc.2), as well as rolling back a couple versions with no success. I did some digging and found out that notExtractLoader from my webpack config

Stacktrace:

BASE_FOLDER/node_modules/extract-text-webpack-plugin/schema/validator.js:11
                throw new Error(ajv.errorsText());
                ^

Error: data['notExtractLoader'] should NOT have additional properties
    at validate (BASE_FOLDER/node_modules/extract-text-webpack-plugin/schema/validator.js:11:9)
    at Function.ExtractTextPlugin.extract (BASE_FOLDER/node_modules/extract-text-webpack-plugin/index.js:190:3)
    at Object.<anonymous> (BASE_FOLDER/webpack.client.prod.js:74:35)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

Going into the commit history, I have determined that 03bb4aa is likely the culprit. Below is the plugin being used in my webpack config:

...
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract({
          notExtractLoader: 'style-loader',
          loader: 'css-loader',
        }),
      },
...

Namely, your loader schema does not include notExtractLoader. Is this still supported? It is still referenced in the example folder, so I went ahead and made a PR for your consideration. Thanks in advance!

@bebraw
Copy link
Contributor

bebraw commented Jan 30, 2017

loader: ExtractTextPlugin.extract should become use: ExtractTextPlugin.extract. I have a fix for loader, but it's waiting on feedback from Tobias.

@bebraw
Copy link
Contributor

bebraw commented Jan 30, 2017

The validation fails because notExtractLoader field does not do anything. I think you may have meant fallbackLoader.

@bebraw
Copy link
Contributor

bebraw commented Jan 30, 2017

Namely, your loader schema does not include notExtractLoader. Is this still supported? It is still referenced in the example folder, so I went ahead and made a PR for your consideration. Thanks in advance!

That example should be fixed. Sounds like that wasn't updated when the loader was updated in the past.

@jgliner
Copy link
Author

jgliner commented Jan 30, 2017

Got it. Thanks!

bebraw added a commit to bebraw/extract-text-webpack-plugin that referenced this issue Jan 30, 2017
It was using `notExtractLoader` and `loader`.

Closes webpack-contrib#375.
bebraw added a commit to bebraw/extract-text-webpack-plugin that referenced this issue Jan 30, 2017
It was using `notExtractLoader` and `loader`.

Closes webpack-contrib#375.
@xavica
Copy link

xavica commented Feb 6, 2017

Is this issue fixed? we still facing same issue.

@bebraw
Copy link
Contributor

bebraw commented Feb 6, 2017

It's fixed, yeah. Read the validation message carefully.

@RSO
Copy link

RSO commented Feb 7, 2017

For other people ending up here because of similar errors, the error message seems to indicate that the key you're using is incorrect. In my case I was using fallBack instead of fallback.

@wzup
Copy link

wzup commented Feb 23, 2017

@RSO doesn't work what you say

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants