Skip to content

Conversation

sommeeeer
Copy link
Contributor

This PR will be in draft mode. Trying to update all the apps in /examples to next 15 and fix the e2e test.

Copy link

changeset-bot bot commented Oct 22, 2024

⚠️ No Changeset found

Latest commit: 70bb0e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sommeeeer
Copy link
Contributor Author

sommeeeer commented Oct 22, 2024

Currently failing on this when i pnpm next build inside examples/app-router:
Type error: 'Link' cannot be used as a JSX component.

@khuezy
Copy link
Contributor

khuezy commented Oct 22, 2024

Can you try reverting the changes to:

    "@types/react": "npm:types-react@19.0.0-rc.1",
    "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",

I'm using the 18.x "@types" in my app and it doesn't complain.

@sommeeeer sommeeeer closed this Oct 22, 2024
@sommeeeer sommeeeer reopened this Oct 22, 2024
@sommeeeer
Copy link
Contributor Author

sommeeeer commented Oct 22, 2024

Not able to build pages-router after upgrading to next 15. I have tried both 19 and 18 for @types/*

@conico974
Copy link
Contributor

@sommeeeer There is an issue with the lockfile https://github.com/opennextjs/opennextjs-aws/actions/runs/11466288277/job/31906625766?pr=588
Also it doesn't look like a typing issueCheck validity of types did succeed.
Most likely it cannot find the correct version of react ( might be related to the lockfile issue )

@sommeeeer
Copy link
Contributor Author

sommeeeer commented Oct 22, 2024

After installing next@latest in pages-router im running into this error: Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead. on /isr.

What happend with the validation? I would like to know if the lockfile is fine now.

For now im trying to stay on React 18 for pages-router. Next 15 should support it : https://nextjs.org/blog/next-15#pages-router-on-react-18

@sommeeeer
Copy link
Contributor Author

sommeeeer commented Oct 23, 2024

So I think its using the wrong dependency for React for some reason. If this is related to pnpm im not sure yet. However, I found out that building with this command works: pnpm next build --experimental-build-mode compile

@khuezy
Copy link
Contributor

khuezy commented Oct 23, 2024

--experimental-build-mode compile
iirc, this flag prevents the prebuilding of the app.

@sommeeeer
Copy link
Contributor Author

sommeeeer commented Oct 23, 2024

alright so im able to build every app now with pnpm next build. had to run the codemod on all the apps in /examples and on /example. choosing to upgrade react and react types to 19 aswell. after that i also had to update the react deps in example/shared. they all had to use the same react v (i.e 19)

i also changed the worldtimeapi to be timeapi instead. (worldtimeapi blocked me after a while)

@sommeeeer
Copy link
Contributor Author

sommeeeer commented Oct 23, 2024

so i was able to run pnpm sst deploy --stage test in examples/sst now. the terminal hangs on this during app-pages-router:

image

if you just wait it will finish in the end, and you will get the deployed urls. as you can see the warning is probably coming from a peer dependency of sst which is ink. its used in sst/cli/deploy.js.

i fixed the e2e to work now and it passes 100%

Copy link

pkg-pr-new bot commented Oct 24, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@588

commit: 70bb0e1

@conico974 conico974 marked this pull request as ready for review October 24, 2024 14:12
Copy link
Contributor

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that @sommeeeer

@conico974 conico974 merged commit ec64cf0 into opennextjs:main Oct 24, 2024
3 checks passed
@khuezy
Copy link
Contributor

khuezy commented Oct 24, 2024

yay thanks @sommeeeer !

@sommeeeer sommeeeer deleted the update-next-15 branch October 28, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants