jsencrypt icon indicating copy to clipboard operation
jsencrypt copied to clipboard

window is not defined in nuxtjs v3

Open rwaddin opened this issue 1 year ago • 8 comments

I use Nuxtjs v3 SSR mode

image

rwaddin avatar Mar 01 '23 03:03 rwaddin

+1

manyoubaby123 avatar Apr 18 '23 11:04 manyoubaby123

+1 If a friend has solved the same problem, can you point it out in the comments section?

OriS3 avatar May 31 '23 03:05 OriS3

https://stackoverflow.com/questions/69476190/nextjs-project-compilation-fails-with-jsencrypt

drattansingh avatar Oct 20 '23 19:10 drattansingh

@rwaddin did you find a fix for this?

saidinusah avatar Nov 22 '23 22:11 saidinusah

I used windows to get the hostname, my problem was solved by parsing the query parameters from the front end before server side rendering.

or in newer versions you can use useRequestURL()

image

@rwaddin did you find a fix for this?

rwaddin avatar Nov 23 '23 02:11 rwaddin

I used windows to get the hostname, my problem was solved by parsing the query parameters from the front end before server side rendering.

or in newer versions you can use useRequestURL()

image

Thanks for your response, did you use this approach with nuxt's api routes or you had a separate backend/api. I'm currently trying to encrypt user password before sending it over to a different server

saidinusah avatar Nov 23 '23 09:11 saidinusah

I used windows to get the hostname, my problem was solved by parsing the query parameters from the front end before server side rendering. or in newer versions you can use useRequestURL() image

Thanks for your response, did you use this approach with nuxt's api routes or you had a separate backend/api. I'm currently trying to encrypt user password before sending it over to a different server

in my case it is like this : image

maybe you can encrypt the password on the nuxt api server before sending to another server.

rwaddin avatar Nov 23 '23 09:11 rwaddin

Oh okay, i ended up using the cdn instead and it works fine

saidinusah avatar Nov 23 '23 11:11 saidinusah