-
Notifications
You must be signed in to change notification settings - Fork 115
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
Moving from 8.0.2 to 8.1.2 causes many "Cannot resolve module" errors with Webpack. #220
Comments
Same here |
Can you please provide some sample code that produces this problem? |
I don't think that I will be able to do that soon. All of my environments are quite complex. |
Can't use this version with webpack:
All |
I'm seeing this issue also, this is a snippet of my webpack config: const plugins = [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.ProvidePlugin({
React: 'react'
})
]
if (process.env.NODE_ENV === 'production') {
plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
output: {
comments: false
}
})
);
}
module.exports = [
{
entry: entries,
output: {
path: join(__dirname, 'demo/dist'),
publicPath: '/dist/',
filename: '[name].out.js'
},
devtool: 'source-map',
resolve: {
extensions: ['', '.js', '.json', '.css'],
alias: {
'react': __dirname + '/node_modules/react'
}
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style!css?modules&importLoaders=1!postcss'
},
{
test: /\.json$/,
loader: 'json'
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel?cacheDirectory'
}
]
},
postcss (wp) {
return [
require('postcss-import')({
addDependencyTo: wp
}),
require('postcss-cssnext')({
browsers: [
'> 1%',
'last 2 versions',
'Firefox ESR',
'iOS 8',
'ie >= 10'
]
}),
require('postcss-reporter')()
];
},
plugins
}
]; ping @Garbee |
some more details: |
Sorry, don't have the time to look into this myself anymore. We are using Sass now for import/mixins/etc. Then using PostCSS to supplement that with the pieces that will go to browsers like |
Guys, use v7, see #210 |
I agree with I'm getting following error if I try to run karma with
cc @longlho |
Have configuration comparable to @longlho. I'm a new user, so if my feedback is of any help, issue only became apparent after adding a |
Newer releases cause issues with Webpack postcss/postcss-import#220
Might be related to webpack/webpack#2901? I have a repo that reproduces the bug here: https://github.com/KidkArolis/webpack-2-failing-build. If this is unrelated - let me know and I'll post this as a separate issue. |
It seems nobody reads other issues #210. |
Just pointing out that the reason of this breaking is explained at webpack/webpack#2411 (comment) |
Version 8.1.3 was released that still has this issue. Current Unfortunately there are no "optional peerDependencies" :/ |
I was having this issue when I was using |
I know, v8.1.3 only fixed #168.
Yeah, I wasn't thinking when I did that. I'm currently considering adding a |
A PR (hopefully) fixing this has been merged to the |
@RyanZim in my case this issue still remains. Currently I'm on |
@code4aman Can you post the error message here? |
@RyanZim here it is. error logERROR in ./client/helpers/fetch.js
Module build failed: (SystemJS) ENOENT: no such file or directory, open 'C:\Users\amank\dev\projname\C:\Users\amank\dev\projname\node_modules\babel-loader\index.js'
Error: ENOENT: no such file or directory, open 'C:\Users\amank\dev\projname\C:\Users\amank\dev\projname\node_modules\babel-loader\index.js'
Error loading C:/Users/amank/dev/projname/C:\Users\amank\dev\projname\node_modules\babel-loader\index.js
@ ./client/pages/Roles/Create/actions.js 2:0-42
@ ./client/pages/Roles/Create/reducers.js
@ ./client/combinedReducers.js
@ ./client/configureStore.js
@ ./client/index.js
@ multi main
ERROR in ./client/components/Main/styles.pcss
Module build failed: (SystemJS) ENOENT: no such file or directory, open 'C:\Users\amank\dev\projname\C:\Users\amank\dev\projname\node_modules\style-loader\index.js'
Error: ENOENT: no such file or directory, open 'C:\Users\amank\dev\projname\C:\Users\amank\dev\projname\node_modules\style-loader\index.js'
Error loading C:/Users/amank/dev/projname/C:\Users\amank\dev\projname\node_modules\style-loader\index.js
@ ./client/components/Main/Main.jsx 5:0-30
@ ./client/components/Main/index.js
@ ./client/Layout.jsx
@ ./client/App.jsx
@ ./client/index.js
@ multi main |
@code4aman try running |
@Kovensky @RyanZim |
Good to hear, closing. Will try to get v9 shipped as soon as I can. |
I'm using:
When I bump from postcss-import 8.0.2 to 8.1.2 then I get the following errors:
I tried adding the following to my webpack config but it doesn't work:
The text was updated successfully, but these errors were encountered: