-
Notifications
You must be signed in to change notification settings - Fork 511
Loader is used without the corresponding plugin error #173
Comments
This just started happening out of nowhere with me, too. I didn't add any new modules. Not sure what changed, to be honest. var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
var path = require('path');
module.exports = {
entry: './index.js',
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['react', 'es2015']
},
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader?modules")
},
{
test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'
},
],
resolve: {
extensions: ['', '.js', '.json', '.css']
},
plugins: [
new ExtractTextPlugin('TextInputs/TextInputs.css', { allChunks: true } ),
new BrowserSyncPlugin({
host: 'localhost',
port: 3000,
server: { baseDir: ['.'] },
reload: false
})
],
}
} |
Happens anytime I'm trying to import a CSS file in my JS module. Both Commenting that line out causes Webpack to run, but the server to not kick off, even with |
I got the same issue since I updated my node version to |
@floross Ohhhh. I didn't even think of that. |
I got the same issue with you @floross |
Have this problem with node 6.0.0, with 5.4.1 works fine |
I got the same issue in node v6.1.0~ |
me too at node v6.1.0 |
@max-mykhailenko |
@pandada8 I use simple |
@max-mykhailenko interesting, in my test, the original |
@pandada8 npm install works good, but webpack build fails. |
node changed the way handling symlinked modules in the node 6.0.0, and reverted default behaviour in 6.2.
try upgrading your node to 6.2 |
@pandada8 i have node |
6.2 works for me.
|
@evilebottnawi @max-mykhailenko would you mind providing some examples of your configs? |
{
loader: ExtractTextPlugin.extract(
'style-loader',
`css-loader?${JSON.stringify({
sourceMap: DEBUG,
// CSS Modules https://github.com/css-modules/css-modules
// modules: true,
// localIdentName: DEBUG ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]',
// CSS Nano http://cssnano.co/options/
minimize: false,
camelCase: true,
url: false,
'import': false
})}`,
'postcss-loader',
`sass-loader?${JSON.stringify({
sourceMap: DEBUG,
config: 'sassConfig'
})}`
)
} |
@evilebottnawi I think ExtractTextPlugin.extract only receive two parameters, maybe you should just use an array to wrap your css loaders ? |
I got the same issue in node v6.1.0 upgrade to v6.2.0 it works loaders : [{
test: /\.less$/,
loader: ExtractTextPlugin.extract(
'style-loader', 'css-loader!less-loader'
)
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader', 'css-loader'
)
}] |
I believe this has been resolved!! Thanks for all the help and comments! |
I'm getting this on node 6.2.1. Is it possible that the issue has returned? Loader definition is as follows: {
test: /\.scss$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'css-loader',
'sass-loader'
),
} |
Same problem here with 6.2.2, tried with npminstall and pnpn with no success.
|
Yep - 6.2.2 still happening for me. Any resolution? EDIT: Updated to 6.3.0 - still the same. |
node v6.2.2, fail |
I found a reason caused by happypack. |
I agree with @ibufu. I want to speed up the stylus build with happypack, but got this error. Node v 6.4.0 |
I don't think that I was using happypack and still had the issue... Not sure if that's helpful or not |
Windows 10 webpack.config.js: index.html: parens for angle brackets example.js: result: |
Issue 24 is closed because of 50. Issue 50 is closed because of 24. Issue 73 is closed because it was marked a "question". It suggests the problem might be location of Issue 173 (this one) suggests the problem may be interaction with There's suggestion to downgrade Node to before 6.0.0. Any chance of another option? Workaround? |
New report; I hope this helps someone. This condition remains for me; I cannot use extract-text-webpack-plugin. On the other hand, the urgency has gone way down for me. I substituted the following configuration: webpack.config.js: index.html: (no change from above) example.js: Initially, I got an error message that I didn't document. I don't know what else I did, or otherwise why it suddenly started working, but it's working. This is a viable workaround for me and for now. |
I had this problem because I din't have less or scss file included in=n my scripts, think this causes an error because it can't find a file to test |
This happened for me whenever I was using styleUrl: something.css inside my angular2 components. |
This is still happening. This is my actual configuration
|
I resolved this with the addition of
|
Had this issue on Node 7.2.0. Downloaded the 6.11.0 version and suddenly it worked. |
It doesn't seem to be related to the version of Node. I also had 7.2 and downgrading to 6.11 didn't solve the problem for me. |
node v8.9.4,fail |
I am experiencing this issue as well with trying to use scss. I installed it the other day and it was working. Switched branches, came back, and then it started showing up. My team is using yarn v0.27.5. I have installed The relevant portion of our webpack.config is:
Error:
(the path above was updated to |
@jrjacobs24 did you finally get it to work somehow? I have the same issue happening... |
@Jonarod I'm sorry, man but I honestly can't remember how I got it working. Somehow I did and just kept plowing ahead because I was so excited haha This was also about a month ago. I'm pretty sure I attempted some uninstalling and reinstalling. FWIW here's what my final setup looked like: module: {
rules: [
// ...
{
test: /\.(s*)css$/,
exclude: /node_modules/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
minimize: false,
sourceMap: true,
importLoaders: 2
}
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
config: { ctx: { env } }
}
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
outFile: 'scss/build/',
outputStyle: 'expanded',
precision: 20
},
}
],
})
},
// ...
},
// ...
plugins: [
// Output our compiled Scss to a stylesheet
new ExtractTextPlugin({
filename: 'scss/build/styles.css',
allChunks: true
})
], |
@jrjacobs24 Aaaaah.Got it working thanks !!!!! I doubled-checked my webpack config and thought it was already coming with the |
@Jonarod That's awesome, man! Almost didn't include that part, but I'm glad I did! |
have this problem too. I solve it by add option
|
I sure could use some help... I implemented extracttext plugin so that I could take advantage of scss sourcemaps for debugging front end styles in my app, however when I run any of my tests it is failing at my 1st .scss include with that same message ( pasted below ). I did get scss source maps working finally, but now I can't get past my build because of this error. Any help would be greatly appreciated, I've been banging my head on this for days. ( I found a similar issue thread here, but I am very unfamiliar with webpack so far and not really sure how to begin troubleshooting. )
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
below is my exports.
The text was updated successfully, but these errors were encountered: