{"action":"closed","issue":{"url":"https://api.github.com/repos/webpack-contrib/karma-webpack/issues/220","repository_url":"https://api.github.com/repos/webpack-contrib/karma-webpack","labels_url":"https://api.github.com/repos/webpack-contrib/karma-webpack/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/webpack-contrib/karma-webpack/issues/220/comments","events_url":"https://api.github.com/repos/webpack-contrib/karma-webpack/issues/220/events","html_url":"https://github.com/webpack-contrib/karma-webpack/issues/220","id":205110849,"number":220,"title":"Can not load \"webpack\" error","user":{"login":"arshtepe","id":1872336,"avatar_url":"https://avatars.githubusercontent.com/u/1872336?v=3","gravatar_id":"","url":"https://api.github.com/users/arshtepe","html_url":"https://github.com/arshtepe","followers_url":"https://api.github.com/users/arshtepe/followers","following_url":"https://api.github.com/users/arshtepe/following{/other_user}","gists_url":"https://api.github.com/users/arshtepe/gists{/gist_id}","starred_url":"https://api.github.com/users/arshtepe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arshtepe/subscriptions","organizations_url":"https://api.github.com/users/arshtepe/orgs","repos_url":"https://api.github.com/users/arshtepe/repos","events_url":"https://api.github.com/users/arshtepe/events{/privacy}","received_events_url":"https://api.github.com/users/arshtepe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-03T09:39:55Z","updated_at":"2017-02-03T12:03:21Z","closed_at":"2017-02-03T12:03:21Z","body":"## **BEFORE YOU SUBMIT** please read the following:\r\n<!--\r\nIf you have a support request or question please submit them to\r\n[StackOverflow](http://stackoverflow.com/questions/tagged/webpack) using the tag\r\n`[webpack]` or\r\nthe [webpack Gitter](https://gitter.im/webpack/webpack). Future support requests will be closed.\r\n-->\r\n\r\n**I'm submitting a bug report**\r\n\r\n**Webpack version:**\r\n2.2.1\r\n\r\n**Webpack Karma version**:\r\n2.0.2\r\n\r\n**Karma version**:\r\n1.4.1\r\n\r\n\r\n**Please tell us about your environment:**\r\nLinux\r\n\r\n**Browser:** [Phantom XX | Chrome XX | Firefox XX | IE XX | Safari XX | Other XX] << (All)\r\n\r\n**Current behavior:**\r\n```\r\nERROR [preprocess]: Can not load \"webpack\"!\r\n  Error\r\n    at webpack (...node_modules/webpack/lib/webpack.js:19:9)\r\n    at new Plugin (.../node_modules/karma-webpack/lib/karma-webpack.js:65:18)\r\n    at invoke (.../node_modules/di/lib/injector.js:75:15)\r\n    at Array.instantiate (.../node_modules/di/lib/injector.js:59:20)\r\n    at get (.../node_modules/di/lib/injector.js:48:43)\r\n    at .../node_modules/di/lib/injector.js:71:14\r\n    at Array.map (native)\r\n    at Array.invoke (.../node_modules/di/lib/injector.js:70:31)\r\n    at Injector.get (.../node_modules/di/lib/injector.js:48:43)\r\n    at instantiatePreprocessor (.../node_modules/karma/lib/preprocessor.js:55:20)\r\n    at Array.forEach (native)\r\n    at createPreprocessor (.../node_modules/karma/lib/preprocessor.js:74:20)\r\n    at Array.invoke .../node_modules/di/lib/injector.js:75:15)\r\n    at get (.../node_modules/di/lib/injector.js:48:43)\r\n    at .../node_modules/di/lib/injector.js:71:14\r\n    at Array.map (native)\r\n```\r\n\r\n\r\n**Expected/desired behavior:**\r\nTests must work :) \r\n\r\nkarma config \r\n```js\r\nmodule.exports = (basePath, files, webpackConfig) => {\r\n    var logLevel = 'LOG_INFO';\r\n    var browsers = [\"PhantomJS\"];\r\n    var singleRun = true;\r\n    let entryName;\r\n    if(argv.entry) {\r\n        entryName = `**/${argv.entry.replace(/\\.js$/, \"\")}.js`\r\n    }\r\n    let entryPath = argv.entryPath;\r\n    let searchPattern = entryName || entryPath || '**/*.js';\r\n    let preprocessors = {};\r\n\r\n    if(Array.isArray(!files)) {\r\n        files = [];\r\n    }\r\n\r\n    preprocessors[searchPattern] = ['webpack', 'sourcemap'];\r\n    files.push(searchPattern); //test must be last include file\r\n\r\n    if (argv.debug) {\r\n        logLevel = 'LOG_DEBUG';\r\n    }\r\n\r\n    if (argv.gui) {\r\n        singleRun = false;\r\n        browsers = [\"Chrome\"];\r\n    }\r\n\r\n    return {\r\n        frameworks: ['jasmine'],\r\n        basePath: basePath,\r\n        browsers: browsers,\r\n        files: files,\r\n        colors: true,\r\n        singleRun: singleRun,\r\n        preprocessors: preprocessors,\r\n        webpack: webpackConfig,\r\n        logLevel: logLevel,\r\n        plugins: [\r\n            require(\"karma-jasmine\"),\r\n            require(\"karma-sourcemap-loader\"),\r\n            require(\"karma-webpack\"),\r\n            require(\"karma-phantomjs-launcher\"),\r\n            require(\"karma-chrome-launcher\"),\r\n            require(\"karma-sourcemap-loader\")\r\n        ]\r\n    }\r\n};\r\n```\r\n"}}
{"actor":{"display_login":"arshtepe"}}