digitalcredentials / web-verifier-plus

VerifierPlus allows users to verify any supported digital academic credential
https://verifierplus.org
MIT License
6 stars 7 forks source link

Update Dockerfile, switch from yarn to npm #113

Closed iodeslykos closed 6 months ago

iodeslykos commented 6 months ago

After attempting to build the Dockerfile, I received the following error:

7.819 ./app/_app.tsx:6:11
7.819 Type error: 'Component' cannot be used as a JSX component.
7.819   Its element type 'ReactElement<any, any> | Component<{}, any, any> | null' is not a valid JSX element.
7.819     Type 'Component<{}, any, any>' is not assignable to type 'Element | ElementClass | null'.
7.819       Type 'Component<{}, any, any>' is not assignable to type 'ElementClass'.
7.819         The types returned by 'render()' are incompatible between these types.
7.819           Type 'React.ReactNode' is not assignable to type 'import("/usr/src/app/node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index").ReactNode'.
7.819             Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
7.819               Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.
7.819 
7.819   4 | 
7.819   5 | function MyApp({ Component, pageProps }: AppProps) {
7.819 > 6 |   return <Component {...pageProps} />
7.819     |           ^
7.819   7 | }
7.819   8 | 
7.819   9 | export default MyApp
7.857 
7.857 > Build error occurred

Switching from yarn to npm for installation of dependencies fixes the issue.

Additionally, I aligned the version of node in the Dockerfile source image and .tool-versions.