Comments (23)
+1
from karma-webpack.
I'm starting to experience this after upgrading to babel-loader from an older 6to5-loader.
from karma-webpack.
Aaaaand I figured it out. If you have webpackServer.quiet flag switched to false
be sure to flip it on so that any build errors get output. In my case, I had a JSX pragma sitting around which Babel wasn't happy with and was spitting out an error that I wasn't seeing.
from karma-webpack.
+1
from karma-webpack.
+1
from karma-webpack.
+1
from karma-webpack.
I think the reason why sometimes this error is happened when you have a problem with webpack compilation every time u see it in log. Solution to catch this error and show people something like this "Hey man you have a problem with webpack comipilation fix it otherwise bla bla , run webpack compile without karma" because this error message not informative IMHO.
from karma-webpack.
You mean pull request?
30 апр. 2015 г. 3:34 PM пользователь "Vladimir Barsukov" <
[email protected]> написал:I think the reason why sometimes this error is happened when you have a
problem with webpack compilation every time u see it in log. Solution to
catch this error and show people something like this "Hey man you have a
problem with webpack comipilation fix it otherwise bla bla , run webpack
compile without karma" because this error message not informative IMHO.—
Reply to this email directly or view it on GitHub
#40 (comment)
.
from karma-webpack.
+1
from karma-webpack.
+1
from karma-webpack.
+1
from karma-webpack.
I ran into this, but I wasn't getting any webpack/compile errors. I fixed it by changing the webpack config in my karma.config to:
preprocessors:
'../src/*.coffee': ['webpack']
'../src/tests/*.coffee' : ['webpack']
instead of
preprocessors:
'src/*.coffee': ['webpack']
'src/tests/*.coffee' : ['webpack']
I'm getting other errors now, but that seems to have fixed this problem by getting out of the karma_webpack directory.
from karma-webpack.
@sethlivingston I don't think doing that is going to run webpack on your files...
from karma-webpack.
+1
from karma-webpack.
@sokra: I took a look under the hood and it seems like it's a pretty straightforward issue. Let me know if you'd like any alterations to the PR.
from karma-webpack.
For me at least, this issue was caused by flycheck (in Emacs) creating temporary files. Excluding these in my karma.conf.js with '**/*/flycheck*.js'
resolved the issue.
from karma-webpack.
+1
from karma-webpack.
+1
from karma-webpack.
@sokra This is still actual. Fix, suggested by the guys above, is helping.
upd: Actually, don't mind. I've fixed it by using contexts. I think it is better to rely on a single resolving and watching mechanism, and webpack works just awesome with that.
from karma-webpack.
I don't understand what the fix is. I'm running webpack with ts-loader and the issue is easily reproducible if I simply copy an existing file into a new file that picked up by my file pattern. E.g. copying app.spec.ts to app.copy.spec.ts gives me:
{ [Error: no such file or directory]
code: 'ENOENT',
errno: 34,
message: 'no such file or directory',
path: '/_karma_webpack_/app/app.copy.spec.ts' }
Error: no such file or directory
at MemoryFileSystem.readFileSync (C:\kod\vn\n2k-client\node_modules\karma-webpack\node_modules\webpack-dev-middleware\node_modules\memory-fs\lib\MemoryFileSystem.js:114:10)
....
@s0ber what does contexts mean in this case?
from karma-webpack.
@beakdoctor Instead of specifying file patterns inside karma configuration, you can specify just one file (a single entry point). And inside this file you can specify a webpack context, which will match files that you want. You can take a look at example here:
https://github.com/webpack/karma-webpack#alternative-usage
from karma-webpack.
Thank you. That works for me.
from karma-webpack.
Hi guys :)
The problem is still here, this should've probably got merged in
Until then,
package.json:
{
"scripts": {
"test": "nodemon --exitcrash -w karma.conf.js karma.js",
"posttest": "npm run test"
}
}
karma.js:
const path = require('path')
const KarmaServer = require('karma').Server
const karmaServer = new KarmaServer({ configFile: path.join(__dirname, 'karma.conf.js') }, process.exit)
karmaServer.start()
npm will restart nodemon automatically when it crashes due to a new file added, and nodemon will restart karma automatically when its configuration changes
from karma-webpack.
Related Issues (20)
- karma-webpack 5.0 No longer notified of compilation starting HOT 2
- Cannot read property 'entry' of undefined
- Cannot read property 'entry' of undefined
- karma-webpack 5 fails to read files with a query parameter (e.g. font-awesome) HOT 6
- 5.0 crashes on MacOS (Preprocessor, Plugin), fixed on master -> Release 5.1? HOT 7
- Trying to add karma-webpack to angular karma config HOT 2
- karma.conf.js being treated as entrypoint results in many errors from webpack 5 HOT 2
- Webpack Errors being reported twice.
- Process is not defined HOT 1
- Error during file loading or preprocessing HOT 7
- Webpack file cache isn't generated when webacpack watch option is false/nothing
- karma-webpack does not respect webpack mode = "production" HOT 3
- I have the same problem. HOT 1
- preprocessor change between v4 & v5 leading to error when used with karma-mocha HOT 15
- Issue with Webpack 5 unable to find file 404 (works with webpack 4) HOT 1
- Don't warn overriding [name].js to [name].js
- Figure out a publishing Github Workflow
- Ensure all project dependencies have no auditing issues
- Provide a migration path from karma-webpack
- Update the README.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-webpack.