Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

REST helper: Global axios instance gets mutated #2652

Closed
pablopaul opened this issue Nov 4, 2020 · 2 comments · Fixed by #2846
Closed

REST helper: Global axios instance gets mutated #2652

pablopaul opened this issue Nov 4, 2020 · 2 comments · Fixed by #2846

Comments

@pablopaul
Copy link
Collaborator

pablopaul commented Nov 4, 2020

Here the global axios instance gets mutated, this leads to an ugly error, when another module depends on the axios defaults like the node-slack-sdk does. See this issue for reference.

The error then is TypeError: Cannot convert undefined or null to object at new WebClient (.../node_modules/@slack/web-api/dist/WebClient.js:110:44)

Please advice how to move this from a global mutation to a local mutation so we are compatible with third party modules.

@pablopaul pablopaul changed the title REST helper: Global axios instance is mutated REST helper: Global axios instance gets mutated Nov 4, 2020
@ranendelman
Copy link

Hi @pablopaul, did you manage to resolve the issue? Trying to use the @slack/web-api and getting the same error TypeError: Cannot convert undefined or null to object at new WebClient,
Thanks.

@pablopaul
Copy link
Collaborator Author

@ranendelman this should be fixed within CodeceptJS version 3.0.4 - please try to upgrade or use this workaround if you cant. Hope this helps.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants