Comments (8)
Same happens for anyone who uses gatsbyjs
from redaxios.
@kevlened apologies for the delay, version 0.3.0 is now published and includes this fix.
from redaxios.
Yes. Under node, use axios.
from redaxios.
I'm in the browser, but Next.js apps are server-side rendered.
from redaxios.
There are two solutions here:
-
Publish redaxios with a
browser
field and pointmain
at the axios package. I'm open to this and will give it a try next week. -
Use Webpack aliases to automatically load "redaxios" instead of "axios", but only in browser bundles:
// next.config.js
module.exports = {
webpack(config, env) {
if (!env.ssr) {
config.resolve.alias.axios = 'redaxios';
}
}
}
from redaxios.
I forked to get this working in sapper.
yarn add kevlened/redaxios
from redaxios.
@barbalex in Gatsby you should never be using Redaxios on the server (or during prerendering). It must be aliased to axios
, since redaxios is not a Node HTTP library.
from redaxios.
@developit yes. And that is important to know for gatsby users that would use it server side.
Unfortunately gatsby causes redaxios to run server side while building the app, even when it is used only client side. Which will probably be the case for most gatsby users using redaxios and is so in our case.
Anyway: v0.3.0 solves the issue. Thanks a lot!
from redaxios.
Related Issues (20)
- credentials not implemented for fetch in some environments such as cfw HOT 2
- post multiple files not working as expected HOT 2
- Request: Run with axios test suite HOT 2
- Support global header defaults
- Improve documentation regarding response.headers
- Fetch blocked by CORS policy HOT 2
- Put request doesnt work HOT 7
- Put request doesnt work (reopened from #76) HOT 1
- Not possible to transform headers per request
- return type of `create` cannot be named HOT 2
- POST requests that work with Axios throw CORS error with Redaxios HOT 9
- Usage on Deno HOT 2
- Adding Axios like Typescript support HOT 6
- Add interceptors HOT 2
- Proxy support
- Missing adapter support HOT 1
- Missing defaults support HOT 1
- Axios is adding a fetch adapter natively. Will Redaxios have any use then? HOT 2
- add next and cache support HOT 1
- Response Parsing Error when Status Code is 204 (No Content) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redaxios.