json-diff icon indicating copy to clipboard operation
json-diff copied to clipboard

Browser exception when deployed under Nuxt 3

Open jcalfee opened this issue 1 year ago • 7 comments

argv is undefined (has-flag.js:30:28) image image

Are you checking somewhere to see if this is node or the browser?

jcalfee avatar May 29 '23 17:05 jcalfee

Same problem here,

This package is dead ? not maintained @andreyvit ?

AnthonyRuelle avatar Jun 23 '23 14:06 AnthonyRuelle

@AnthonyRuelle @jcalfee

Sorry to see this issue. Note that json-diff is maintained, but the error appears to be in colors package.

ewoudenberg avatar Jun 23 '23 14:06 ewoudenberg

True, but I'm not sure the colors would support the browser. Chromium does not show colors in the console as far as I know. I see now, you have an option { color: false } already, I think I need to just use that. I'm not setup to test now but that should do the trick. Thanks

jcalfee avatar Jun 23 '23 14:06 jcalfee

Please reopen this issue. With color: false the problem persist :/

AnthonyRuelle avatar Jun 23 '23 15:06 AnthonyRuelle

In that case, a dynamic import of the colors (if enabled) may be the way to go.

jcalfee avatar Jun 23 '23 15:06 jcalfee

even setting color: false, the processing crashes

image

Has anyone managed to resolve this issue?

AnthonyRuelle avatar Jun 26 '23 09:06 AnthonyRuelle

Same problem here, Has anyone managed to resolve this issue

soarding avatar Jul 07 '23 07:07 soarding