blitz-js / superjson

Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.
MIT License
3.88k stars 83 forks source link

An error occurs when serializing the array with un-serialize-data #288

Closed lwt09 closed 2 months ago

lwt09 commented 2 months ago

An error occurs when executing the code below superjson.stringify({ data: ['data1', new Error('test')] })

version; "superjson": "^2.2.1"

image image
Skn0tt commented 2 months ago

In what environment are you executing this? Is it Node, a Browser, Bun, …?

lwt09 commented 2 months ago

In what environment are you executing this? Is it Node, a Browser, Bun, …?您是在什么环境中执行这个操作?是在 Node、浏览器、Bun 等环境中吗?

I'm very sorry, the problem has been solved. The environment I'm running does not support URL... It's a castrated version of the JS environment.