AykutSarac / jsoncrack.com

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML, CSV and more, into interactive graphs.
https://jsoncrack.com/
Other
32.87k stars 2.11k forks source link

[BUG]: Problems when run docker build in some tags #330

Closed vmachadoss closed 1 year ago

vmachadoss commented 1 year ago

Issue description

When i try to run the command docker build -t jsoncrack . i receive an error on my terminal:

ReferenceError: AbortController is not defined
    at fetchCSSFromGoogleFonts (/src/node_modules/next/dist/compiled/@next/font/dist/google/fetch-css-from-google-fonts.js:34:28)
    at nextFontGoogleFontLoader (/src/node_modules/next/dist/compiled/@next/font/dist/google/loader.js:76:79)
    at /src/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js:72:99
    at async Span.traceAsyncFn (/src/node_modules/next/dist/trace/trace.js:79:20)
Failed to compile.

src/components/CustomNode/styles.tsx
`next/font` error:
Failed to fetch `Roboto Mono` from Google Fonts.

src/components/CustomNode/styles.tsx
An error occured in `next/font`.

NextFontError: Failed to fetch `Roboto Mono` from Google Fonts.
{...}

This happens when I clone the repository from the main or when I download the v2.8.0 available tag

Someone was pass through this ?

Media & Screenshots

No response

Operating system

Priority this issue should have

Low (slightly annoying)

adamnock commented 1 year ago

This is a node version compatibility issue. Upgrading the node version (currently Dockerfile specifies 14) to 15+ resolves

Tested just now using node:latest, no issues with build

vmachadoss commented 1 year ago

Thanks @adamnock , this is work for me.

For curiosity, how did you know ?

adamnock commented 1 year ago

@vitormds22 bit of googling about specifically "Failed to fetch Roboto Mono from Google Fonts." and found the answer in this thread https://github.com/vercel/next.js/issues/45080

vmachadoss commented 1 year ago

Nice, thank you so much.