Skip to content
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

Can not load "webpack" #1497

Closed
kof opened this issue Jul 16, 2015 · 15 comments · Fixed by aackerman/PropTypes#2
Closed

Can not load "webpack" #1497

kof opened this issue Jul 16, 2015 · 15 comments · Fixed by aackerman/PropTypes#2

Comments

@kof
Copy link

kof commented Jul 16, 2015

https://stackoverflow.com/questions/31444743/karma-cant-load-webpack/31452564

Its reproducible when you install all the latest versions of karma-* on node v2.3.4

@AlexKVal
Copy link

react-bootstrap/react-bootstrap same issue.

@dignifiedquire
Copy link
Member

Thanks for the report, I will look into it as soon as I can

@dignifiedquire
Copy link
Member

Can you please check if this is still an issue in 0.13.1

@mateatslc
Copy link

@dignifiedquire yep, still seeing it with v0.13.1

@erkiesken
Copy link

I'm also still having the same issue. My project tried to closely follow this example project.

$ <node_modules/karma/package.json | grep version
  "version": "0.13.1",
$ karma start
16 07 2015 22:43:10.756:WARN [preprocess]: Can not load "webpack"!
  Error: Can not resolve circular dependency! (Resolving: preprocessor:webpack -> webpackPlugin -> preprocessor:webpack)
    at error (/Volumes/code/experiments/modern-react/node_modules/karma/node_modules/di/lib/injector.js:22:68)
    at get (/Volumes/code/experiments/modern-react/node_modules/karma/node_modules/di/lib/injector.js:44:15)
    at instantiatePreprocessor (/Volumes/code/experiments/modern-react/node_modules/karma/lib/preprocessor.js:56:37)
    at Array.forEach (native)
    at null.<anonymous> (/Volumes/code/experiments/modern-react/node_modules/karma/lib/preprocessor.js:77:31)
    at tryCatcher (/Volumes/code/experiments/modern-react/node_modules/bluebird/js/main/util.js:26:23)
    at ret [as _preprocess] (eval at <anonymous> (/Volumes/code/experiments/modern-react/node_modules/bluebird/js/main/promisify.js:163:12), <anonymous>:13:39)
    at /Volumes/code/experiments/modern-react/node_modules/karma/lib/file-list.js:183:19
    at Array.map (native)
    at /Volumes/code/experiments/modern-react/node_modules/karma/lib/file-list.js:168:30
    at Array.map (native)
    at List._refresh (/Volumes/code/experiments/modern-react/node_modules/karma/lib/file-list.js:151:37)
    at List.refresh (/Volumes/code/experiments/modern-react/node_modules/karma/lib/file-list.js:250:27)
    at Plugin.notifyKarmaAboutChanges (/Volumes/code/experiments/modern-react/node_modules/karma-webpack/index.js:109:16)
    at Plugin.<anonymous> (/Volumes/code/experiments/modern-react/node_modules/karma-webpack/index.js:73:9)
    at Tapable.applyPlugins (/Volumes/code/experiments/modern-react/node_modules/webpack/node_modules/tapable/lib/Tapable.js:26:37)
16 07 2015 22:43:19.039:INFO [karma]: Karma v0.13.1 server started at http://localhost:9876/
16 07 2015 22:43:19.050:INFO [launcher]: Starting browser Chrome
16 07 2015 22:43:20.323:INFO [Chrome 43.0.2357 (Mac OS X 10.10.4)]: Connected on socket hShBX6sNlGjwOg1oAAAA with id 8720101
.
Chrome 43.0.2357 (Mac OS X 10.10.4): Executed 1 of 1 SUCCESS (0.046 secs / 0.032 secs)

My package.json relevant deps:

    "karma": "^0.13.1",
    "karma-chrome-launcher": "^0.2.0",
    "karma-cli": "^0.1.0",
    "karma-mocha": "^0.2.0",
    "karma-sourcemap-loader": "^0.3.5",
    "karma-webpack": "^1.6.0",
    "mocha": "^2.2.5",
    "webpack": "^1.10.1",

@Uter1007
Copy link

same here :(

Node v0.12.7

Same Example tried.

Stacktrace:
16 07 2015 22:22:06.617:WARN [preprocess]: Can not load "webpack"!
  Error: Can not resolve circular dependency! (Resolving: preprocessor:webpack -> webpackPlugin -> preprocessor:webpack)
    at error (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:22:68)
    at get (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:44:15)
    at instantiatePreprocessor (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\lib\preprocessor.js:56:37)
    at Array.forEach (native)
    at null.<anonymous> (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\lib\preprocessor.js:77:31)
    at tryCatcher (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\node_modules\bluebird\js\main\util.js:26:23)
    at ret [as _preprocess] (eval at <anonymous> (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\node_modules\bluebird\js\main\promisify.js:163:12), <anonymous>:13:39)
    at C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\lib\file-list.js:183:19
    at Array.map (native)
    at C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\lib\file-list.js:168:30
    at Array.map (native)
    at List._refresh (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\lib\file-list.js:151:37)
    at List.refresh (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma\lib\file-list.js:250:27)
    at Plugin.notifyKarmaAboutChanges (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma-webpack\index.js:109:16)
    at Plugin.<anonymous> (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma-webpack\index.js:73:9)
    at Tapable.applyPlugins (C:\Users\Christoph\AppData\Roaming\npm\node_modules\karma-webpack\node_modules\webpack\node_modules\tapable\lib\Tapable.js:26:37)

@MichalZalecki
Copy link

To get around this issue downgrading karma. This set up works:

"karma": "^0.12.36",
"karma-chrome-launcher": "^0.2.0",
"karma-html-reporter": "^0.2.6",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^0.2.0",
"karma-webpack": "^1.6.0",

@dignifiedquire dignifiedquire removed this from the 0.13.1 milestone Jul 17, 2015
@tshelburne
Copy link

Another working config:

"karma": "^0.12.36",
"karma-chrome-launcher": "^0.2.0",
"karma-cli": "^0.1.0",
"karma-mocha": "^0.2.0",
"karma-sourcemap-loader": "^0.3.5",
"karma-webpack": "^1.6.0",

@dignifiedquire
Copy link
Member

Just a quick update, I was able to find out what the underlying issue is: In short dependency injection sucks. Fix coming soon

@dignifiedquire
Copy link
Member

Okay I've just released 0.13.2 that will resolve the issue together with this pr: codymikol/karma-webpack#63

@mateatslc
Copy link

now just have to wait till that PR gets merged... ಠ_ಠ

@tshelburne
Copy link

Hooray for OSS! Also, thanks for the quick attention to the problem - pretty awesome turnaround time.

@haf
Copy link

haf commented Jul 19, 2015

OT: DI sucks because it exposes cyclic dependencies? I'd say that's a win for DI and by avoiding partial/unreliable initialisation ;)

Happy for fix, would be great to get codymikol/karma-webpack#63 merged and released =)

@mateatslc:

"karma-webpack": "git+https://github.com/Dignifiedquire/karma-webpack.git#29fb1d801158f29cb0eb784edff69356705a7b74",

@tupy
Copy link

tupy commented Jul 31, 2015

@dignifiedquire closed?

@dignifiedquire
Copy link
Member

yep fixed now

eknuth added a commit to eknuth/react-seed that referenced this issue Aug 13, 2015
Updating the karma version allows the tests to run.

Was related to karma-runner/karma#1497
fdidron pushed a commit to fdidron/re-base that referenced this issue Sep 14, 2015
SeniorDev118 pushed a commit to SeniorDev118/Node.js_Firebase that referenced this issue Jun 25, 2018
SeniorDev118 pushed a commit to SeniorDev118/Node.js_Firebase that referenced this issue Jun 25, 2018
SeniorDev118 added a commit to SeniorDev118/Node.js_Firebase that referenced this issue Jun 25, 2018
SeniorDev118 added a commit to SeniorDev118/Node.js_Firebase that referenced this issue Jun 25, 2018
SeniorDev118 added a commit to SeniorDev118/Node.js_Firebase that referenced this issue Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants