xk6-client-prometheus-remote icon indicating copy to clipboard operation
xk6-client-prometheus-remote copied to clipboard

jslib.k6.io/k6-summary cannot be imported

Open marioosh11 opened this issue 3 years ago • 1 comments

Hi Team I have k6 tests with import like below: import { textSummary } from 'https://jslib.k6.io/k6-summary/0.0.1/index.js'

When I run docker command with docker image ghcr.io/grafana/xk6-client-prometheus-remote:v0.2.2 I see: ERRO[0000] Module specifier "https://jslib.k6.io/k6-summary/0.0.1/index.js" was tried to be loaded as remote module by prepending "https://" to it, which didn't work. If you are trying to import a nodejs module, this is not supported as k6 is _not_ nodejs based. Please read https://k6.io/docs/using-k6/modules for more information. Remote resolution error: "Get "https://jslib.k6.io/k6-summary/0.0.1/index.js": x509: certificate signed by unknown authority" at go.k6.io/k6/js.(*InitContext).Require-fm (native) at file:///mnt/c/D/HM/Repos/common-cart/tests/k6/full.test.js:1:0(33) hint="script exception"

I checked with flag --insecure-skip-tls-verify=true but it doesn't help

BR Mario

marioosh11 avatar May 25 '22 11:05 marioosh11

Hi @marioosh11 sorry for the long delay :(

Does this error happen for you with k6 not build with xk6? Preferably again from inside docker?

--insecure-skip-tls-verify is only about k6 script requests, so like http.get and co. not about requests k6 does on your behalf. Relevant issue https://github.com/grafana/k6/issues/2697

mstoykov avatar Jan 13 '23 13:01 mstoykov