-
Notifications
You must be signed in to change notification settings - Fork 516
Stuck up on ‘loader is used without the corresponding plugin’ #50
Comments
It's |
Thank you! I was sure it would be something silly. |
I have this <script src="https://gist.github.com/manodupont/ea38455f608a87970b22.js"></script>Still it stuck with loader not corresponding ... |
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: __dirname + '/src/js/main.jsx',
output: {
path: __dirname + "/dist/js",
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.jsx?$/, loader: 'jsx-loader?harmony' },
{ test: /\.scss$/, loader: ExtractTextPlugin.extract( 'style-loader', 'css-loader!sass-loader' ) },
]
},
plugins: [
new ExtractTextPlugin( "bundle.css" )
]
}; |
Still, it doesn't work [1] ERROR in ../src/containers/Main.scss |
in fact, more precisely, i have all this .. var webpack = require("webpack");
var path = require("path");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
target: "web",
cache: false,
context: __dirname,
debug: false,
devtool: false,
entry: ["../src/client"],
output: {
path: path.join(__dirname, "../static/dist"),
filename: "client.js",
chunkFilename: "[name].[id].js"
},
plugins: [
new ExtractTextPlugin("styles.css"),
new webpack.DefinePlugin({__CLIENT__: true, __SERVER__: false, __PRODUCTION__: true, __DEV__: false}),
new webpack.DefinePlugin({"process.env": {NODE_ENV: '"production"'}}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({compress: {warnings: false}}),
],
module: {
loaders: [
{
test: /\.json$/,
loaders: ["json"]
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader")
}
],
postLoaders: [
{test: /\.js$/, loaders: ["babel?presets[]=es2015&presets[]=stage-0&presets[]=react"], exclude: /node_modules/}
],
noParse: /\.min\.js/
},
resolve: {
modulesDirectories: [
"src",
"node_modules",
"web_modules"
],
extensions: ["", ".json", ".js"]
},
node: {
__dirname: true,
fs: 'empty'
}
}; |
Not sure if this is of any help to you, but I ran into this issue after upgrading from lodash 3 to 4. Switching back to 3 fixed it for me. |
Was this every fixed, having this exact issue right now >:( |
@jamesone Make sure you didn't later overwrite module.exports.plugins in your webpack config. |
Got this issue when using it with gulp and webpack stream. I installed it, added the default example as shown in the docs, get this error. |
I sure could use some help here too... 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. I did get scss source maps working finally, but now I can't get past my build because of this error. :-(
|
You will find this error under node 6.0.0, and you can fix it if your node version is lower. @jamesone |
For those of us on recent node versions, is there a fix? |
I had this issue. Hope it helps anybody. |
For me this happens only when I use ETP with |
#207 |
Sorry for ripping back up this issue here, but I'm currently experience the same issue, even tho when I log my WebpackConfig, Plugins: [ DefinePlugin {
definitions:
{ 'process.env': [Object],
NODE_ENV: 'production',
__API_HOST__: '"http://my.app"',
__API_ENDPOINT__: '"/api/v1"',
__API_CLIENT_ID__: '"1"',
__API_CLIENT_SECRET__: '"XXXXXXXXXXX"',
__DEV__: false,
__PROD__: true,
__DEBUG__: false,
__DEBUG_NEW_WINDOW__: false,
__BASENAME__: '"/"' } },
OccurrenceOrderPlugin { preferEntry: undefined },
DedupePlugin {},
HtmlWebpackPlugin {
options:
{ template: '/src/index.hbs',
filename: 'index.html',
hash: false,
inject: 'body',
compile: true,
favicon: '/src/static/favicon.ico',
minify: [Object],
cache: true,
showErrors: true,
chunks: 'all',
excludeChunks: [],
title: 'Webpack App',
xhtml: false,
segment: [Object],
newRelic: [Object] } },
ProvidePlugin { definitions: { React: 'react', ReactDOM: 'react-dom' } },
ExtractTextPlugin {
filename: '[name].[contenthash].css',
options: { allChunks: true },
id: 1 } ] I clearly shows the
If I'm running pretty much face against the wall, now after seen various issue fixes in this thread. :) If any one can see some obivious, please enlighten me :) Here is the config of the plugin: webpackConfig.plugins.push(
new ExtractTextPlugin('[name].[contenthash].css', {
allChunks: true
})
); |
running into this error too after adding the @ngtools/webpack loader and setting up the Angular's AOT.
npm 3.10.6 node 6.9.5, webpack 2.2.1, extract-text-webpack-plugin 2.0.0-rc.3 config:
Any ideas? |
Guys I'm stuck on this issue as well... Any ideas?
|
jsut noticed there is a new issue about this with possible solution #417 |
@GeorgeKnap It seems like this issue disappeared :'( |
the url was not working. this is the one: #417 |
@GeorgeKnap Same error with @ngtools/webpack here, did you made any progress on it ? |
There is a bugfix already merged into the webpack main branch that is
supposed to fix this problem. Just need to wait for the next webpack
release.
Dne 3. 3. 2017 16:41 napsal uživatel "kavi87" <notifications@github.com>:
… @GeorgeKnap <https://github.com/GeorgeKnap> Same error with
@ngtools/webpack here, did you made any progress on it ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALXlMwvkYyb-RNi1EvSfBuqpEAEhPx4wks5riDSsgaJpZM4DcDF5>
.
|
you can try it,I solved the problem, but I was still very surprised // loader config for angular component styles
{
test: /\.(scss|css)$/,
use: ['raw-loader','sass-loader'], // don't use css-loader for ng2 (unusual)
},
// loader config for global css files
{
test: /\.scss$/,
exclude: [path.resolve(__dirname, '/node_modules/'), path.resolve(__dirname, 'src/app')],
// exclude: [/node_modules/, /src\/app/], something wrong with ng4
use: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
use: ['css-loader','sass-loader']
})
}, |
The issue is still there in webpack 2.3.1. Guess the webpack/webpack/#4189 did not help.
|
I was running into a similar issue, which was solved by changing |
"npm install node-sass --save-dev" solved my problem. |
Running into this issue with webpack 2.4 and extract-text-webpack-plugin 2.0.1:
I can also confirm that the plugin is, indeed, defined on the webpack.config.js:
|
Can you please help me, my code seems to be running fine on Angular 2 (build and local server) but with Angular 4 only the local server is working. On trying to create a build it gives an error ERROR in Error: Child compilation failed: this is my sett up for webpack.client.js const { root } = require('./helpers'); const { AotPlugin } = require('@ngtools/webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const ScriptExtPlugin = require('script-ext-html-webpack-plugin');
const extractCSS = new ExtractTextPlugin({ filename: '[name].[hash]_'+new Date().getTime()+'.css', disable: false, allChunks: true }); module.exports = { |
Have same issue, compiles with JIT but fails with AOT, ExtractTextPlugin included in same way, but mysteriously missed. |
Getting the same error once moved all my files to 'src' folder:
and the same with every imported .css file webpack.config.js:
Any suggestions? |
Alright so this problem had been really aggravating for me for a long time. I was getting the same terrible error that everyone else has been getting:
This error had been following me ever since I started using Webpack and I had to compromise with just using the node-sass-middleware , which does not bundle the way I want it to. I figured out an alternative around using the extract-text-webpack-plugin, which was causing the error for me with a conflicting plugin. Instead, I started using 'extract-loader' with 'file-loader', which only requires you to use loaders and no plugins are required. You need to install both. Here is the client side webpack config I use to bundle css, scss, and bootstrap/bootswatch scss in the dependency tree:
This alternative solution works exactly the same way as extract-text-webpack-plugin as far as I can tell, but if you are having issues with your config due to conflicting plugins, this method does not require plugins at all, so it should work for everyone. I eventually found out that my problem was with my list of plugins, so if you are determined to get extract-text-webpack-plugin to work you might want to take a look at your plugins list, because it seems like this is where the problem lies. Debug it by removing all your plugins except the extract plugin, and also make sure your dev/prod conditionals are not getting in the way of your plugins list or your extract plugin from running when you are trying to run your config. |
same issue...... anyone can help? |
Webpack cannot compile the bundle.
config:
main/jsx
Loaders are installed. It works fine when I just inline styles in bundle.
What did I do wrong?
The text was updated successfully, but these errors were encountered: