Comments (12)
from laravel-server-side-rendering.
I have the same problem, how did you fix this?
from laravel-server-side-rendering.
I don't know why this issue is closed....
I am getting the same error.
one way to work around this, I guess is to use serversideProps in each individual page.
from laravel-server-side-rendering.
Oh...
Sorry
For adapter, you should use
`import adapter from 'axios/lib/adapters/http'
axios(URL, {
adapter: adapter
})
`
from laravel-server-side-rendering.
I found that context.rendered not work
from laravel-server-side-rendering.
Hello I suppose that problem there because the process variable is empty when script runs
from laravel-server-side-rendering.
@SerhiyP what process variable are you talking about?
I have the same problem during ssr, on client-side requests are fine
from laravel-server-side-rendering.
I don't remember what was the problem
But you can try to set in webpack
target: 'node'
It might help you
from laravel-server-side-rendering.
@SerhiyP thanks for your response
there is the reason why we don't have this in our webpack configuration, it breaks our logger ('fs' module issues)
can you explain why target:node would fix axios issue? not really getting this...
from laravel-server-side-rendering.
@SerhiyP tried this, getting XMLHttpRequest is not defined
error when doing that
same as in this discussion: axios/axios#2968
from laravel-server-side-rendering.
same error,how to fix it???
from laravel-server-side-rendering.
Oh... Sorry For adapter, you should use
`import adapter from 'axios/lib/adapters/http'
axios(URL, { adapter: adapter }) `
This answer worked for me perfectly fine and is definitely a lifesaver so Thanks for your contribution @SerhiyP .
I'm grateful ❤️
MY USE CASE
I am working on a vscode web extension which I want to work in desktop (nodejs) environment. Axios was throwing the exact same error for me. This fix helped me resolve this issue.
from laravel-server-side-rendering.
Related Issues (20)
- SSR React with import 'style.scss' dosnt work HOT 2
- process.env always empty HOT 2
- Target class [] does not exist. BindingResolutionException HOT 1
- It is not working HOT 1
- Svelte - TypeError : cannot set property '.svelte' of undefined at registerExtension. HOT 1
- How to catch errors in vue render HOT 1
- PHP 8 Support HOT 1
- error when using Style section
- Question about webcomponents
- vue3 support HOT 1
- Can rollback to support for Laravel 5.5 ~ 5.8? HOT 1
- html parameter of renderVueComponentToString is an empty string HOT 5
- nuxtjs SSR HOT 1
- nextjs SSR HOT 1
- self is not defined HOT 3
- Cannot find element: #app HOT 1
- document is not defined HOT 1
- Spatie-Laravel Server Side working absolutely fine over localhost but when I uploaded it to the server it shows ssr() is undefined Please help how to solve it? HOT 3
- Laravel SSR: ReferenceError: window is not defined HOT 1
- Use spatie/laravel-server-side-rendering for rendering blade and its js. 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 laravel-server-side-rendering.