Giter Site home page Giter Site logo

Comments (23)

snario avatar snario commented on May 14, 2024

+1

from karma-webpack.

balanceiskey avatar balanceiskey commented on May 14, 2024

I'm starting to experience this after upgrading to babel-loader from an older 6to5-loader.

from karma-webpack.

balanceiskey avatar balanceiskey commented on May 14, 2024

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.

mz026 avatar mz026 commented on May 14, 2024

+1

from karma-webpack.

barsukov avatar barsukov commented on May 14, 2024

+1

from karma-webpack.

Coobaha avatar Coobaha commented on May 14, 2024

+1

from karma-webpack.

barsukov avatar barsukov commented on May 14, 2024

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.

ColCh avatar ColCh commented on May 14, 2024

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.

geminiyellow avatar geminiyellow commented on May 14, 2024

+1

from karma-webpack.

Celestz avatar Celestz commented on May 14, 2024

+1

from karma-webpack.

keriwarr avatar keriwarr commented on May 14, 2024

+1

from karma-webpack.

sethlivingston avatar sethlivingston commented on May 14, 2024

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.

gonzofish avatar gonzofish commented on May 14, 2024

@sethlivingston I don't think doing that is going to run webpack on your files...

from karma-webpack.

mewdriller avatar mewdriller commented on May 14, 2024

+1

from karma-webpack.

mewdriller avatar mewdriller commented on May 14, 2024

@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.

bzalasky avatar bzalasky commented on May 14, 2024

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.

thomasklein avatar thomasklein commented on May 14, 2024

+1

from karma-webpack.

okmttdhr avatar okmttdhr commented on May 14, 2024

+1

from karma-webpack.

s0ber avatar s0ber commented on May 14, 2024

@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.

sandlunds avatar sandlunds commented on May 14, 2024

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.

s0ber avatar s0ber commented on May 14, 2024

@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.

sandlunds avatar sandlunds commented on May 14, 2024

Thank you. That works for me.

from karma-webpack.

Silviu-Marian avatar Silviu-Marian commented on May 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.