Closed Alexnortung closed 20 hours ago
I have found a workaround for anyone else having this issue.
import axios from 'axios';
import axiosHttpAdapter from 'axios/lib/adapters/http.js';
const client = axios.create({
adapter: axiosHttpAdapter,
});
Then use the client
in your services
I believe this is not an issue in v5. If there are still problems in v4, we can move this back to the strapi/strapi repo.
Bug report
Required System information
Describe the bug
I wanted to try to use the new
strapi plugin
command to create a new plugin. I know it is experimental, but I think you want the feedback anyway. It is not possible to use axios on the server side, when axios is called, the process just crashes. This seems to be a problem with the bundler.Steps to reproduce the behavior
strapi plugin:init
Expected behavior
I expected it would be possible to use axios on the server.
Additional context
This discussion tells that it might be something with the bundler