Closed sarasensible closed 1 year ago
Hi @sarasensible,
There is no collision - both export are a default ones and you can do a default import and when doing that you can name them w/e.
import exec from 'k6/execution
'and
import something from 'k6/execution'will just bind the same thing to
execor
something`. In both cases the module has no way of knowing or caring how the default export it provided is imported.
So in your case you can do import execer from 'k6/x/exec'
or if you want you can also do import { default as execer } from 'k6/x/exec'
.
If you only need the command import { command } from 'k6/x/exec'
and then use it directly as command
instead of execer.command
.
I will be closing this issue, but if you have more question you might try the community forum
Yes both options you gave work for me. Thanks!
The name of this module collides with exec from k6/execution.
Attempted workaround (does not work)
Results in