Closed christopherthielen closed 6 years ago
We had to lock version to 2.0.9 as this breaking change was not announced properly
Could someone please quick review (#310) ?
Released in v2.0.12
🎉
@michael-ciniawsky This is still failing for me in v2.0.12
peters@peters $ npm install
karma-webpack@2.0.12 node_modules/karma-webpack
├── source-map@0.5.7
├── loader-utils@1.1.0 (big.js@3.2.0, emojis-list@2.1.0, json5@0.5.1)
├── async@2.6.0
├── webpack-dev-middleware@1.12.2 (time-stamp@2.0.0, path-is-absolute@1.0.1, range-parser@1.2.0, mime@1.6.0, memory-fs@0.4.1)
└── lodash@4.17.5
peters@peters $ npm run ci:angular-unit-tests
> campspot@1.0.0 ci:angular-unit-tests /Users/peters/IdeaProjects/campspot
> node --max_old_space_size=4096 $(npm bin)/karma start karma.ci.conf.js
26 02 2018 16:51:04.972:ERROR [plugin]: Error during loading "karma-webpack" plugin:
Cannot find module 'babel-runtime/helpers/toConsumableArray'
26 02 2018 16:51:05.066:ERROR [preprocess]: Can not load "webpack", it is not registered!
Perhaps you are missing some plugin?
START:
26 02 2018 16:51:05.229:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
26 02 2018 16:51:05.230:INFO [launcher]: Launching browser ChromeCustom with unlimited concurrency
26 02 2018 16:51:05.231:ERROR [karma]: Found 2 load errors
npm ERR! Darwin 17.4.0
npm ERR! argv "/Users/peters/.nvm/versions/node/v4.2.2/bin/node" "/Users/peters/.nvm/versions/node/v4.2.2/bin/npm" "run" "ci:angular-unit-tests"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! campspot@1.0.0 ci:angular-unit-tests: `node --max_old_space_size=4096 $(npm bin)/karma start karma.ci.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the campspot@1.0.0 ci:angular-unit-tests script 'node --max_old_space_size=4096 $(npm bin)/karma start karma.ci.conf.js'.
npm ERR! This is most likely a problem with the campspot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node --max_old_space_size=4096 $(npm bin)/karma start karma.ci.conf.js
npm ERR! You can get their info via:
npm ERR! npm owner ls campspot
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/peters/IdeaProjects/campspot/npm-debug.log
😞 Could include some context ({Error}
Logs,package.json
etc), did you clean the npm/yarn cache
and updated the lockfile
etc ?
@michael-ciniawsky updated my previous comment with out console output. We are using it as a dev-dependency so it will not be included in our lockfile. I did clear the npm cache
On project with webpack@3.7.1 karma@1.7.1 karma-webpack@2.0.12 the following error is encountered.
ERROR [plugin]: Error during loading "C:\project\node_modules/karma-webpack" plugin:
Cannot find module 'babel-runtime/helpers/toConsumableArray'
ERROR [preprocess]: Can not load "webpack", it is not registered!
This seems to be caused by the fact project doesn't use babel and babel-runtime is not provided as dependency by karma-webpack. Thus require call fails on _\nodemodules\karma-webpack\lib\karma-webpack.js:3
var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
Not sure why there is no notice, but just FYI: this was fixed in #312. Note: could well be that it's gonna be reverted 😃
I'm submitting a bug report
Webpack version: 3.11.0
Webpack Karma version: 1.7.x
Karma version: 2.0.11
Please tell us about your environment: OSX
Current behavior:
Adding
babel-runtime
as a dep fixes the issue. Guessing this was due to https://github.com/webpack-contrib/karma-webpack/commit/6d28c5cf1246e1659a7553c18af6f43de84a7db5. 2.0.9 was the last version of karma-webpack that worked without babel-runtime.