Code Monkey home page Code Monkey logo

Comments (12)

nicovigil1 avatar nicovigil1 commented on June 1, 2024 48

samesies

from laravel-server-side-rendering.

JonathanMurre avatar JonathanMurre commented on June 1, 2024 3

I have the same problem, how did you fix this?

from laravel-server-side-rendering.

yasen002 avatar yasen002 commented on June 1, 2024 3

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.

SerhiyP avatar SerhiyP commented on June 1, 2024 1

Oh...
Sorry
For adapter, you should use

`import adapter from 'axios/lib/adapters/http'

axios(URL, {
adapter: adapter
})
`

from laravel-server-side-rendering.

kieuminhcanh avatar kieuminhcanh commented on June 1, 2024

I found that context.rendered not work

from laravel-server-side-rendering.

SerhiyP avatar SerhiyP commented on June 1, 2024

Hello I suppose that problem there because the process variable is empty when script runs

from laravel-server-side-rendering.

suhostv avatar suhostv commented on June 1, 2024

@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.

SerhiyP avatar SerhiyP commented on June 1, 2024

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.

suhostv avatar suhostv commented on June 1, 2024

@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.

suhostv avatar suhostv commented on June 1, 2024

@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.

dmwin72015 avatar dmwin72015 commented on June 1, 2024

same error,how to fix it???

from laravel-server-side-rendering.

aadarshp31 avatar aadarshp31 commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.