Use crypto server side in nuxt3 (3.8) with node 18
Hi, how can I use crypto server side in nuxt3 (3.8) with node 18 ?
There is a recommendation for a server side plugin, but this isn't working:
Using this I get a 500 error
Cannot assign to read only property 'crypto' of object '#<Object>'
The recommendation came from https://github.com/nuxt/nuxt/discussions/19290GitHub
crypto is not defined · nuxt nuxt · Discussion #19290
I'm trying to get an auth token in a way that's compatible with the Cloudflare Workers environment. CF workers uses the Web Crypto API. However, in development my API endpoints throw a 500 ...
5 Replies
Hi @mpgalaxy. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, you might find the Nuxt documentation on plugins helpful for understanding how to properly configure server-side plugins in Nuxt 3. Additionally, you may want to explore the Nuxt server framework documentation for more insights on server-side operations.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@975729328660832258> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@kapa.ai this was not helpful
Let me check the knowledge base for you again. One moment! :books:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, you might find the Nuxt documentation on plugins helpful for understanding how to properly configure server-side plugins in Nuxt 3. Additionally, you may want to explore the Nuxt server framework documentation for more insights on server-side operations.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@975729328660832258> Kapa.ai is still learning and improving, please let me know how I did by reacting below.