Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Convex example to convex@0.12.0 #47175

Merged
merged 5 commits into from Mar 28, 2023

Conversation

ianmacartney
Copy link
Contributor

@ianmacartney ianmacartney commented Mar 15, 2023

Updates Convex to 0.12.0

Improving Documentation or adding/fixing Examples

@ianmacartney
Copy link
Contributor Author

pnpm build for me doesn't work, even on vercel's canary branch. It seems caught up by different react type versions:
e.g.

next:build: > next@13.2.5-canary.4 types /Users/ianmacartney/src/next-examples/packages/next
next:build: > tsc --declaration --emitDeclarationOnly --stripInternal --declarationDir dist
next:build: 
next:build: ../../node_modules/.pnpm/@types+react@16.9.17/node_modules/@types/react/index.d.ts(2883,19): error TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}, any>' and 'Component<any, {}, any>'.
...
next:build: ../../node_modules/.pnpm/@types+react@18.0.28/node_modules/@types/react/index.d.ts(3305,13): error TS2717: Subsequent property declarations must have the same type.  Property 'line' must be of type 'SVGProps<SVGLineElement>', but here has type 'SVGProps<SVGLineElement>'.
...
next:build: src/server/render.tsx(219,11): error TS2786: 'App' cannot be used as a JSX component.
next:build:   Its element type 'ReactElement<any, string | JSXElementConstructor<any>> | Component<AppPropsType<any, {}>, any, any> | null' is not a valid JSX element.
next:build:     Type 'Component<AppPropsType<any, {}>, any, any>' is not assignable to type 'Element | ElementClass | null'.
next:build:       Type 'Component<AppPropsType<any, {}>, any, any>' is not assignable to type 'ElementClass'.
next:build:         The types returned by 'render()' are incompatible between these types.
next:build:           Type 'React.ReactNode' is not assignable to type 'import("/Users/ianmacartney/src/next-examples/node_modules/.pnpm/@types+react@18.0.28/node_modules/@types/react/index").ReactNode'.

When I copy my example to a new repo, it works just fine though. It just doesn't have the lint rules there.
Let me know what I can try to get pnpm build working

@ianmacartney
Copy link
Contributor Author

Running pnpm lint also fails on canary, before my change:

@next/font:typescript: 
Checking formatting...
/Users/ianmacartney/src/next-examples/node_modules/.pnpm/alex@9.1.0/node_modules/alex/cli.js:12
var mdx = require('remark-mdx')
          ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/ianmacartney/src/next-examples/node_modules/.pnpm/remark-mdx@2.3.0/node_modules/remark-mdx/index.js from /Users/ianmacartney/src/next-examples/node_modules/.pnpm/alex@9.1.0/node_modules/alex/cli.js not supported.

@ianmacartney
Copy link
Contributor Author

pnpm dev works but running pnpm types hits the same issues as build

@ijjk ijjk added the examples Issue/PR related to examples label Mar 23, 2023
@ianmacartney ianmacartney marked this pull request as ready for review March 23, 2023 23:57
@ianmacartney ianmacartney requested review from a team, leerob and steven-tey as code owners March 23, 2023 23:57
@ianmacartney ianmacartney changed the title Update Convex example to convex@0.11.0 Update Convex example to convex@0.12.0 Mar 27, 2023
@ianmacartney
Copy link
Contributor Author

@leerob could we get a review on this sometime soon? Thanks!

@kodiakhq kodiakhq bot merged commit 38953ad into vercel:canary Mar 28, 2023
90 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants