And why I've got this errors when running tests? `...
# javascript
r
And why I've got this errors when running tests?
Copy code
> Task :browserTest
12 12 2019 19:59:43.293:ERROR [preprocess]: Can not load "webpack", it is not registered!

  Perhaps you are missing some plugin?

12 12 2019 19:59:43.296:ERROR [preprocess]: Can not load "sourcemap", it is not registered!
i
Could you please copy your
build/js/packages/<module-name>-tes/karma.config.js
here?
r
karma.conf.js
i
Seems that it is ok, could you please clean project and then build it again? If error will be reproduced, could you please share your project?
r
could it be because of some devDependencies defined in package.json inside kvision jar's ?
karma version is being forced to 4.3.0
and I see the project without kvision dependencies uses 4.4.1
yes, I've fixed the issue by adding
implementation(npm("karma","4.4.1"))
to my
build.gradle.kts
and forcing the higher version
thank you for the inspiration :-)
rubber duck 1
i
You are right, different versions is key But! NodeJS and yarn are able to resolve this situation, and they do, they put karma with 4.1.0 version in “local”
node_modules
of your module (
build/js/packages/js-plugin-test-test/node_modules/karma
) but plugins for Karma installed in “project”
node_modules
(
build/js/node_modules
) And this version of karma run, but seems that in case of wildcard plugins (
karma-*
in
karma.config.js
) Karma find plugins only in
node_modules
where it installed. And it seems that it is Karma’s defect, I investigate what can we do