-
Notifications
You must be signed in to change notification settings - Fork 219
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
Error: no such file or directory /_karma_webpack_/. #230
Comments
I'm also having this issue, and I can't understand how the code as written is intended to work. It appears to want to have webpack always write to I don't see how this could've ever worked, so I'm assuming I just don't understand what this code is trying to do, so then I can figure out how to fix it or work around it. |
@davetron5000 We're running into the same problem. In // Must have the common _karma_webpack_ prefix on path here to avoid
// https://github.com/webpack/webpack/issues/645
webpackOptions.output.path = '/_karma_webpack_/' + indexPath;
webpackOptions.output.publicPath = '/_karma_webpack_/' + publicPath; webpack/webpack#645 was an issue back in 2014 about infinite loop due to two compilers both having First of all, I don't see why any project should have their All webpack wants is an absolute path. Please allow customization at least. Btw the webpack infinite loop issue had already been fixed. |
I have the same problem with a slightly different error message:
While this is definitely legit bug, as a workaround I just stripped the |
ENOENT can't open file error as well, has anyone had success finding a workaround? |
Started running into this as well, and I think I figured out what is happening. To host files for karma, karma-webpack uses webpack-dev-middleware, which uses an in-memory file system. The Be very careful with the webpack plugins you use with karma-webpack and remove as many plugins as you can in the webpack config used with karma-webpack. A number of plugins do not understand these in-memory file system paths. |
I've got a fix on my branch for this guy to point all the |
I'm submitting a bug report
Webpack version:
2.2.1
Webpack Karma version:
2.0.2
Karma version:
1.5.0
Please tell us about your environment:
OSX 10.12.3
Current behavior:
Any plugin trying to write to assets folder will fail because karma webpack rewrites
webpackOptions.output
like so.Since that path
/_karma_webpack_/...
has never existed the plugin which tries to write to asset folder will fail withENOENT can't open file
error.Expected/desired behavior:
Do not change
webpackOptions.output.path
so that plugins can write files to asset folder w\o any problem.I had 2 plugins failing:
webpack-bundle-analyzer
andsw-precache-webpack-plugin
.The first one is much easier to configure but it does not really mater. What matters is that plugins rightfully expect to get valid path in
webpackOptions.output.path
and they are getting some junk.With this config
BundleAnalyzerPlugin
will try to output 2 files inwebpackOptions.output.path
and will fail.The text was updated successfully, but these errors were encountered: