You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use the socketio client wtih k6. I have installed the socket.io-clinet with webpack and build a [name].bundle.js file.
But the problem is here, when I use 'web' for 'target' key in webpack config file, I get this error: document is not defined, and I know that node dose not have access to document. when I change the 'target' value to 'node', I get 'fs' error.
How can I fix this issue?
Thanks for your attention.
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered:
Hi, please search the issues before opening a new one.
Support for socket.io was already discussed in #1306, and there's a JS implementation that uses xk6-websockets here.
The reason you're getting those errors is because k6 does not use a browser or Node JS runtime, so some JS libraries that target these won't work in k6. See the documentation.
Feature Description
I want to use the socketio client wtih k6. I have installed the socket.io-clinet with webpack and build a [name].bundle.js file.
But the problem is here, when I use 'web' for 'target' key in webpack config file, I get this error: document is not defined, and I know that node dose not have access to document. when I change the 'target' value to 'node', I get 'fs' error.
How can I fix this issue?
Thanks for your attention.
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: