axios-fetch-adapter icon indicating copy to clipboard operation
axios-fetch-adapter copied to clipboard

Project still active?

Open eric-nicular opened this issue 2 years ago • 4 comments

Is this repo still maintained/usable?

I tried using this with Quasar V2 to make my Axios calls compatible with service workers, but am having difficulty. All the rest of my frontend data is being saved, but not the Axios GET or POST requests. Any assistance would be much appreciated.

eric-nicular avatar Sep 28 '22 23:09 eric-nicular

As the repo was updated only 28 hours after you submitted this issue, I would have said no, but considering there has been no response nor activity from the owner since then, it might be today.

Personally I'm studying the possibility of using this adapter (or finding another maintained fetch adapter) to use axios on Deno :

import axios from 'https://unpkg.com/[email protected]/dist/esm/axios.min.js';
import axiosFetchAdapter from 'https://jspm.dev/@vespaiach/[email protected]';
const client = axios.create({
    adapter: axiosFetchAdapter
});

@kuu12, @odroltd, @dmitriib-slash, if you're planning to maintain the project, would you please consider unifying your efforts and enabling issues ?

Thanks.

KaKi87 avatar Oct 26 '22 16:10 KaKi87

@KaKi87 were you able to find an alternative? This project seems dead and looking for one that is compatible with axios v1+

crhistianramirez avatar Aug 30 '23 17:08 crhistianramirez

I did : https://github.com/haverstack/axios-fetch-adapter

It doesn't officially support v1.x though.

KaKi87 avatar Aug 30 '23 18:08 KaKi87

Thanks! I see that although I was actually able to get that package to work with v1.x. Looks like they are referencing some library helpers that are no longer exported in v1.x, more info here but you can modify your webpack config to pull from the node module files directly

Here's what it looks like in next.js

const path = require("path");

/** @type {import('next').NextConfig} */
const nextConfig = {
  webpack: (config) => {
    config.resolve.alias = {
      ...config.resolve.alias,
      // Fix: Missing "./lib/helpers" specifier in "axios" package
      "axios/lib": path.resolve(__dirname, "./node_modules/axios/lib"),
    };

    return config;
  },
};

module.exports = nextConfig;

Then it was just a matter of ignoring the peer dependency warnings with npm install --legacy-peer-deps

crhistianramirez avatar Aug 30 '23 18:08 crhistianramirez