{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/karma-webpack/issues/40","labels_url":"https://api.github.com/repos/webpack/karma-webpack/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/webpack/karma-webpack/issues/40/comments","events_url":"https://api.github.com/repos/webpack/karma-webpack/issues/40/events","html_url":"https://github.com/webpack/karma-webpack/issues/40","id":56954083,"number":40,"title":"Error when adding new file with watcher","user":{"login":"ColCh","id":599439,"avatar_url":"https://avatars.githubusercontent.com/u/599439?v=3","gravatar_id":"","url":"https://api.github.com/users/ColCh","html_url":"https://github.com/ColCh","followers_url":"https://api.github.com/users/ColCh/followers","following_url":"https://api.github.com/users/ColCh/following{/other_user}","gists_url":"https://api.github.com/users/ColCh/gists{/gist_id}","starred_url":"https://api.github.com/users/ColCh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ColCh/subscriptions","organizations_url":"https://api.github.com/users/ColCh/orgs","repos_url":"https://api.github.com/users/ColCh/repos","events_url":"https://api.github.com/users/ColCh/events{/privacy}","received_events_url":"https://api.github.com/users/ColCh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-02-08T14:54:49Z","updated_at":"2015-11-24T02:52:07Z","closed_at":null,"body":"I have karma running with watcher enabled.\r\n\r\nIt throws an error when I create __new__ file (__Product-view.jsx__ is new file itself)\r\n```shell\r\nwebpack: bundle is now INVALID.\r\nERROR [karma]: [Error: Path doesn't exist '/_karma_webpack_/specs/components/Product-view.jsx']\r\nError: Path doesn't exist '/_karma_webpack_/specs/components/Product-view.jsx'\r\n    at MemoryFileSystem.readFileSync (/srv/node_modules/karma-webpack/node_modules/webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem.js:82:10)\r\n    at MemoryFileSystem.readFile (/srv/node_modules/karma-webpack/node_modules/webpack-dev-middleware/node_modules/memory-fs/lib/MemoryFileSystem.js:201:21)\r\n    at doRead (/srv/node_modules/karma-webpack/index.js:157:26)\r\n    at Plugin.readFile (/srv/node_modules/karma-webpack/index.js:161:3)\r\n    at /srv/node_modules/karma-webpack/index.js:177:17\r\n    at nextPreprocessor (/srv/node_modules/karma/lib/preprocessor.js:59:28)\r\n    at /srv/node_modules/karma/lib/preprocessor.js:97:7\r\n    at fs.js:336:14\r\n    at /srv/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs/graceful-fs.js:104:5\r\n    at /srv/node_modules/karma/node_modules/graceful-fs/graceful-fs.js:104:5\r\n```\r\nAttaching my karma.conf.js also:\r\n```js\r\n'use strict';\r\n\r\nvar webpack = require('webpack');\r\nvar path = require('path');\r\nvar ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\r\n\r\nmodule.exports = function (config) {\r\n  config.set({\r\n\r\n    // base path that will be used to resolve all patterns (eg. files, exclude)\r\n    basePath: '',\r\n\r\n    // frameworks to use\r\n    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter\r\n    frameworks: ['mocha', 'sinon-chai'],\r\n\r\n    // list of files / patterns to load in the browser\r\n    files: [\r\n      'specs/**/*.jsx'\r\n    ],\r\n\r\n    // list of files to exclude\r\n    exclude: [\r\n    ],\r\n\r\n    // preprocess matching files before serving them to the browser\r\n    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor\r\n    preprocessors: {\r\n      'specs/**/*.jsx': [\"webpack\"]\r\n    },\r\n\r\n    // test results reporter to use\r\n    // possible values: 'dots', 'progress'\r\n    reporters: ['progress', 'coverage'],\r\n\r\n    coverageReporter: {\r\n        type : 'html',\r\n        dir : 'coverage/'\r\n    },\r\n\r\n    // web server port\r\n    port: 9876,\r\n\r\n    // Timeout for capturing a browser (in ms).\r\n    captureTimeout: 60 * 1e3,\r\n\r\n    // to avoid DISCONNECTED messages\r\n    browserDisconnectTimeout : 10000, // default 2000\r\n    browserDisconnectTolerance : 1, // default 0\r\n    browserNoActivityTimeout : 60 * 1e3, //default 10000\r\n\r\n    // enable / disable colors in the output (reporters and logs)\r\n    colors: true,\r\n\r\n    // level of logging\r\n    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG\r\n    logLevel: config.LOG_ERROR,\r\n\r\n    // enable / disable watching file and executing tests whenever any file changes\r\n    autoWatch: true,\r\n\r\n    // start these browsers\r\n    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher\r\n    browsers: ['PhantomJS'],\r\n\r\n    // Continuous Integration mode\r\n    // if true, Karma captures browsers, runs the tests and exits\r\n    singleRun: false,\r\n\r\n    // Include timeout because of rsync\r\n    autoWatchBatchDelay: 2 * 1e3,\r\n\r\n    // webpack options\r\n    webpack: {\r\n      cache: true,\r\n      devtool: 'inline-source-map',\r\n      watchDelay: 3 * 1e3,\r\n      resolve: {\r\n        extensions: ['', \".webpack.js\", '.js', '.jsx'],\r\n        modulesDirectories: [\"node_modules\", \"bower_components\"],\r\n        alias: {\r\n          'flux': path.join(__dirname, 'src/scripts/flux'),\r\n          'src': path.join(__dirname, 'src/'),\r\n          'routes': path.join(__dirname, 'src/scripts/routes'),\r\n          'components': path.join(__dirname, 'src/scripts/components'),\r\n          'scripts': path.join(__dirname, 'src/scripts'),\r\n          'styles': path.join(__dirname, 'src/styles'),\r\n          \"kendo\": \"kendo-ui-webpack\"\r\n        }\r\n      },\r\n      module: {\r\n        preLoaders: [\r\n            {test: /(\\.jsx)|(\\.js)$/, exclude: /(node_modules|bower_components|specs)/, loader: 'isparta-instrumenter'},\r\n        ],\r\n        loaders: [\r\n          {test: /(react)|(react\\/addons)$/, loader: 'expose?React!imports?shim=es5-shim/es5-shim&sham=es5-shim/es5-sham'},\r\n          {test: /\\/jquery.js$/, loader: 'expose?jQuery'},\r\n          {test: /react-tabs.*\\.js$/, loader: '6to5-loader?experimental&runtime'},\r\n          {test: /(\\.jsx)|(\\.js)$/, exclude: /node_modules/, loader: '6to5-loader?experimental&runtime'},\r\n          {test: /\\.css$/, loader:  'null'},\r\n          {test: /\\.(png|jpg|gif)$/, loader: 'null'},\r\n          {test: /icon-.+\\.(svg)$/, loader: 'null'},\r\n          {test: /\\.styl$/, loader: 'null'},\r\n          {test: /\\.woff.?$/, loader: \"null\" },\r\n          {test: /fonts\\/.*\\.(ttf|eot|svg)(\\?v=[0-9]\\.[0-9]\\.[0-9])?$/, loader: \"null\"},\r\n          {test: /\\.json$/, loader: \"json-loader\"},\r\n          {test: /bootstrap\\/js\\//, loader: 'imports?jQuery=jquery'},\r\n          {test: /kendo\\-ui\\-core[\\///].*\\.js$/, loader: \"imports?jQuery=jquery\"},\r\n        ]\r\n      },\r\n      plugins: [\r\n        new webpack.PrefetchPlugin('react'),\r\n        new webpack.PrefetchPlugin('jquery'),\r\n        new webpack.PrefetchPlugin('lodash'),\r\n        new webpack.PrefetchPlugin('fluxxor'),\r\n        new webpack.PrefetchPlugin('react-router'),\r\n        new webpack.ProvidePlugin({\r\n          to5Runtime: \"imports?global=>{}!exports?global.to5Runtime!6to5/runtime\",\r\n          React: 'react/addons',\r\n          _: 'lodash',\r\n          Router: 'react-router',\r\n          Fluxxor: 'Fluxxor',\r\n        }),\r\n        new webpack.DefinePlugin({'global.BACKEND_HOST': '\"http://localhost:8080/\"'}),\r\n        new webpack.DefinePlugin({'global.RESOURCE_PATH_PREFIX': '\"http//localhost:8000\"'}),\r\n        new webpack.DefinePlugin({'process.env.NODE_ENV': '\"development\"', 'global.SIDE': '\"frontend\"'}),\r\n        new webpack.ResolverPlugin(\r\n          new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin(\"bower.json\", [\"main\"])\r\n        )\r\n      ]\r\n    },\r\n\r\n    webpackMiddleware: {\r\n      stats: {\r\n        // With console colors\r\n        colors: true,\r\n        // add the hash of the compilation\r\n        hash: false,\r\n        // add webpack version information\r\n        version: false,\r\n        // add timing information\r\n        timings: true,\r\n        // add assets information\r\n        assets: false,\r\n        // add chunk information\r\n        chunks: false,\r\n        // add built modules information to chunk information\r\n        chunkModules: false,\r\n        // add built modules information\r\n        modules: false,\r\n        // add also information about cached (not built) modules\r\n        cached: false,\r\n        // add information about the reasons why modules are included\r\n        reasons: false,\r\n        // add the source code of modules\r\n        source: true,\r\n        // add details to errors (like resolving log)\r\n        errorDetails: true,\r\n        // add the origins of chunks and chunk merging info\r\n        chunkOrigins: true,\r\n        // Add messages from child loaders\r\n        children: false\r\n      }\r\n    },\r\n\r\n  });\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/webpack/karma-webpack/issues/comments/159136383","html_url":"https://github.com/webpack/karma-webpack/issues/40#issuecomment-159136383","issue_url":"https://api.github.com/repos/webpack/karma-webpack/issues/40","id":159136383,"user":{"login":"okmttdhr","id":5287479,"avatar_url":"https://avatars.githubusercontent.com/u/5287479?v=3","gravatar_id":"","url":"https://api.github.com/users/okmttdhr","html_url":"https://github.com/okmttdhr","followers_url":"https://api.github.com/users/okmttdhr/followers","following_url":"https://api.github.com/users/okmttdhr/following{/other_user}","gists_url":"https://api.github.com/users/okmttdhr/gists{/gist_id}","starred_url":"https://api.github.com/users/okmttdhr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okmttdhr/subscriptions","organizations_url":"https://api.github.com/users/okmttdhr/orgs","repos_url":"https://api.github.com/users/okmttdhr/repos","events_url":"https://api.github.com/users/okmttdhr/events{/privacy}","received_events_url":"https://api.github.com/users/okmttdhr/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T02:52:07Z","updated_at":"2015-11-24T02:52:07Z","body":"+1"}}