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

chore: upgraded to Next.js 14 #2020

Merged
merged 8 commits into from May 10, 2024
Merged

Conversation

nickytonline
Copy link
Member

@nickytonline nickytonline commented Oct 31, 2023

Description

The deploy preview appears to be all good. I've navigated around the app a bit and things seem to be behaving correctly. Also trying out next dev --turbo for faster local development.

Take the deploy preview for a spin. If folks are happy with the smoke test, we can merge and monitor it in the beta environment for a bit before going to prod.

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Closes #2021

Mobile & Desktop Screenshots/Recordings

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Oct 31, 2023

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit c3d2dfd
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/663e1052a1a19e0008dcf5a4
😎 Deploy Preview https://deploy-preview-2020--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 31, 2023

βœ… Deploy Preview for oss-insights ready!

Name Link
πŸ”¨ Latest commit c3d2dfd
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/663e1052fb631e000975a41f
😎 Deploy Preview https://deploy-preview-2020--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nickytonline nickytonline marked this pull request as ready for review October 31, 2023 03:12
package.json Outdated
"@storybook/nextjs": "^7.2.0",
"@storybook/react": "^7.2.0",
"@storybook/nextjs": "^7.5.2",
"@storybook/react": "^7.5.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

This was required as Storybook builds were failing.

@bdougie
Copy link
Member

bdougie commented Oct 31, 2023

Only checking from phone, but get an internal service error when visiting the following link.

https://deploy-preview-2020--oss-insights.netlify.app/hub/lists/new

@OgDev-01
Copy link
Contributor

Also getting an error viewing a list
image

@OgDev-01
Copy link
Contributor

This behaviour is seen on all pages that uses getServersideProps. I'll look deeper to see why

@nickytonline
Copy link
Member Author

This behaviour is seen on all pages that uses getServersideProps. I'll look deeper to see why

Don't spend too much time on that as this isn't a high priority atm. Not sure why I didn't see that. πŸ€”

@nickytonline
Copy link
Member Author

Going to close this for now and revisit this later.

@nickytonline nickytonline deleted the nickytonline/upgrade-next-14 branch November 17, 2023 03:53
@nickytonline nickytonline restored the nickytonline/upgrade-next-14 branch March 13, 2024 14:04
@nickytonline nickytonline reopened this Mar 13, 2024
@nickytonline
Copy link
Member Author

2:55:43 PM: ❯ Using Next.js Runtime - v5.0.0-rc.4
2:55:44 PM: ​
2:55:44 PM: @netlify/plugin-nextjs (onPreBuild event)                     
2:55:44 PM: ────────────────────────────────────────────────────────────────
2:55:44 PM: ​
2:55:44 PM: No Next.js cache to restore
2:55:44 PM: ​
2:55:44 PM: (@netlify/plugin-nextjs onPreBuild completed in 8ms)
2:55:44 PM: ​
2:55:44 PM: Build command from Netlify app                                
2:55:44 PM: ────────────────────────────────────────────────────────────────
2:55:44 PM: ​
2:55:44 PM: $ npm run prebuild && npm run build
2:55:44 PM: npm info using npm@10.2.4
2:55:44 PM: npm info using node@v18.19.1
2:55:44 PM: > @open-sauced/app@2.7.1-beta.2 prebuild
2:55:44 PM: > node generate-netlify-env.js
2:55:44 PM: Running in Netlify CI environment
2:55:44 PM: Running in Netlify deploy-preview environment
2:55:44 PM: npm info ok
2:55:44 PM: npm info using npm@10.2.4
2:55:44 PM: npm info using node@v18.19.1
2:55:44 PM: > @open-sauced/app@2.7.1-beta.2 prebuild
2:55:44 PM: > node generate-netlify-env.js
2:55:45 PM: Running in Netlify CI environment
2:55:45 PM: Running in Netlify deploy-preview environment
2:55:45 PM: > @open-sauced/app@2.7.1-beta.2 build
2:55:45 PM: > next build
2:55:45 PM: ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
2:55:45 PM:    β–² Next.js 14.1.3

@nickytonline
Copy link
Member Author

nickytonline commented Mar 13, 2024

I have to dig a bit, but with v5 RC 4, the deploy went well @MarcL and the site for the most part appears to be working, but our middleware does not appear to be working/kicking in. It looks like it may not have been deployed. As mentioned we're on the pages router and the middleware.ts file is in the root of the application.

Full deploy logs here, https://app.netlify.com/sites/oss-insights/deploys/65f1f66440a3070008aeb3b3

We have a netlify.toml file but note the build command is in the UI, mainly because we're not set up as a monorepo atm and we deploy Storybook for another site, and the Storybook deploy command is handled in the Netlify UI as well. I don't think this would affect the build, but just mentioning it.

As mentioned, I'll dig deeper tomorrow.

@brandonroberts brandonroberts requested review from a team and removed request for OgDev-01 March 13, 2024 20:41
@MarcL
Copy link

MarcL commented Mar 14, 2024

@nickytonline - I've brought it up with the team and we'll have a look too.

@ascorbic
Copy link

ascorbic commented Mar 14, 2024

Hey @nickytonline! I've just tried this on a fork and it works fine as far as I can see. I added a log inside the middleware and I can see it being called. WHat are your build settings in the UI?

@nickytonline
Copy link
Member Author

nickytonline commented Mar 14, 2024

In my deploy preview, our workspaces feature does not load the workspace but rather a non-existent page.

image

There's some legacy cleanup with the file based routing which is why a lot of non-existent routes load a page like the above.

This is what should be loading (from our beta site as an example)

image

My reflex was the middleware wasn't working, but it is because it does redirect to a worspaces route, so that was just me not drinking enough coffee. 🀣

I thought it was working on your fork @ascorbic, but after login, you're redirected to our beta site because your domain isn't configured for Supabase.

Here's the settings from the Netlify UI.

image

You can see this working if you run it locally.

So I think the actual issue is why do /workspaces routes not load the actual workspaces pages? Associated pages are in https://github.com/open-sauced/app/tree/beta/pages/workspaces

Maybe the other file based route (legacy issue mentioned above) is taking precedence for some reason (not an issue with the current runtime) because the workspaces routes are generated.

2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]                                                 23.1 kB         530 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights                            7.75 kB         361 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights/[listId]                   385 B           254 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights/[listId]/activity          4.72 kB         527 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights/[listId]/add-contributors  11.4 kB         510 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights/[listId]/edit              9.34 kB         367 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights/[listId]/highlights        12.6 kB         491 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights/[listId]/overview          15.4 kB         863 kB
2:57:28 PM: β”œ β—‹ /workspaces/[workspaceId]/contributor-insights/find                       12 kB           510 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributor-insights/new                        6.9 kB          403 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/contributors                                    8.8 kB          856 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/repository-insights                             9.4 kB          347 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/repository-insights/[insightId]/activity        16.2 kB         534 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/repository-insights/[insightId]/contributors    8.99 kB         882 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/repository-insights/[insightId]/dashboard       18.9 kB         511 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/repository-insights/[insightId]/edit            5.64 kB         356 kB
2:57:28 PM: β”œ β—‹ /workspaces/[workspaceId]/repository-insights/new                         5.66 kB         356 kB
2:57:28 PM: β”œ Ξ» /workspaces/[workspaceId]/settings                                        14.8 kB         377 kB
2:57:28 PM: β”” Ξ» /workspaces/new                                                           7.49 kB         363 kB

I haven't run ntl serve to test it out, but that's mainly because I run into some issues with our edge function, ESM and CJS issues, but that's for another day. πŸ˜…

Like I mentioned I haven't dug too deep yet. I have some other work to do this morning my time, but will dig a bit more this afternoon.

@nickytonline
Copy link
Member Author

I came back to the site after it just redeployed and now I can hit a workspaces page, so I think this might be some app code that caused my issue. This loads fine now, https://deploy-preview-2020--oss-insights.netlify.app/workspaces/3432aaf7-55db-4c2b-9fde-f61604471e21 .

CleanShot 2024-03-14 at 09 00 40

I think this might be an issue in our code. πŸ˜… cc: @brandonroberts I think there might be some client-side redirect wonkiness after logging in from the root as I got the generic greedy route initially (see above).

I think for the time being we're all good. I'll continue to test things out @ascorbic @MarcL.

@nickytonline
Copy link
Member Author

@brandonroberts, it looks like our /workspaces isn't redirecting to the last workspace accessed anymore and ends up redirecting to /workspaces/dashboard/filter/recent instead. I'll have to look into that. It doesn't appear to be happening on beta, so maybe I messed something up during a rebase.

TLDR; it's probably me. πŸ˜…

@ascorbic
Copy link

That's great! Let us know how you get on

@nickytonline
Copy link
Member Author

The proof of concept with this demonstrated that everything is working with the release candidate of the Netlify Next Runtime. I will update this PR once the official version is released and updated automatically for our sites on Netlify @brandonroberts.

@nickytonline nickytonline force-pushed the nickytonline/upgrade-next-14 branch 2 times, most recently from f50f06c to 1f789e2 Compare May 9, 2024 19:43
@nickytonline
Copy link
Member Author

We're upgrading now. I believe I need to upgrade Storybook as well. Just taking a peek at that.

@nickytonline
Copy link
Member Author

nickytonline commented May 9, 2024

Just looking into a Node.js out of memory error during the build, https://app.netlify.com/sites/oss-insights/deploys/663d28f3125be03906a1225f#L2272-L2290.

@nickytonline
Copy link
Member Author

nickytonline commented May 9, 2024

Looks like I'm getting Node.js out of memory consistently during a build.

3:52:40 PM: <--- Last few GCs --->
3:52:40 PM: [5857:0x5b89850]    73690 ms: Mark-sweep 2001.1 (2083.9) -> 2001.1 (2079.6) MB, 438.4 / 0.0 ms  (average mu = 0.429, current mu = 0.128) allocation failure; scavenge might not succeed
3:52:40 PM: [5857:0x5b89850]    74490 ms: Mark-sweep 2010.8 (2089.4) -> 2010.8 (2105.4) MB, 785.1 / 0.0 ms  (average mu = 0.202, current mu = 0.018) allocation failure; scavenge might not succeed
3:52:40 PM: <--- JS stacktrace --->
3:52:40 PM: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
3:52:40 PM:  1: 0xb9a330 node::Abort() [node]
3:52:40 PM:  2: 0xaa07ee  [node]
3:52:40 PM:  3: 0xd71ed0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
3:52:40 PM:  4: 0xd72277 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
3:52:40 PM:  5: 0xf4f635  [node]
3:52:40 PM:  6: 0xf61b0d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
3:52:40 PM:  7: 0xf3c1fe v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
3:52:40 PM:  8: 0xf3d5c7 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
3:52:40 PM:  9: 0xf1db40 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
3:52:40 PM: 10: 0xf155b4 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [node]
3:52:40 PM: 11: 0xf17948 v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString(int, v8::internal::AllocationType) [node]
3:52:40 PM: 12: 0x130438d v8::internal::Runtime_StringBuilderConcat(int, unsigned long*, v8::internal::Isolate*) [node]
3:52:40 PM: 13: 0x1710739  [node]
3:52:42 PM: Aborted (core dumped)

https://app.netlify.com/sites/oss-insights/deploys/663d2b98d286670008400d65#L2275-L2293

@nickytonline
Copy link
Member Author

A local build via ntl build runs fine, but I also have more RAM.

❯ ntl build

Netlify Build                                                 
────────────────────────────────────────────────────────────────

❯ Version
  @netlify/build 29.36.1

❯ Flags
  dry: false
  offline: false

❯ Current directory
  /Users/nicktaylor/dev/work/app

❯ Config file
  /Users/nicktaylor/dev/work/app/netlify.toml

❯ Context
  production

❯ Installing plugins
   - @netlify/plugin-nextjs@5.2.2

❯ Using Next.js Runtime - v5.2.2

@netlify/plugin-nextjs (onPreBuild event)                     
────────────────────────────────────────────────────────────────


(@netlify/plugin-nextjs onPreBuild completed in 4ms)

Build command from Netlify app                                
────────────────────────────────────────────────────────────────

$ npm run prebuild && npm run build
npm info using npm@10.2.4
npm info using node@v20.11.0

> @open-sauced/app@2.26.0-beta.2 prebuild
> node generate-netlify-env.js

npm info ok 
npm info using npm@10.2.4
npm info using node@v20.11.0

> @open-sauced/app@2.26.0-beta.2 prebuild
> node generate-netlify-env.js


> @open-sauced/app@2.26.0-beta.2 build
> next build

  β–² Next.js 14.2.3
  - Environments: .env


./pages/_app.tsx
96:6  Warning: React Hook useEffect has a missing dependency: 'router.events'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/feed/index.tsx
115:6  Warning: React Hook useEffect has a missing dependency: 'signIn'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
123:6  Warning: React Hook useEffect has a missing dependency: 'followersRepo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
129:6  Warning: React Hook useEffect has a missing dependency: 'openSingleHighlight'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/start.tsx
73:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/user/notifications.tsx
63:6  Warning: React Hook useEffect has missing dependencies: 'fetchNotifications' and 'router'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/workspaces/[workspaceId]/contributor-insights/[listId]/highlights.tsx
163:6  Warning: React Hook useEffect has a missing dependency: 'contributor'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/workspaces/[workspaceId]/contributor-insights/new.tsx
97:6  Warning: React Hook useEffect has missing dependencies: 'contributorIds' and 'title'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/workspaces/[workspaceId]/repository-insights/new.tsx
53:6  Warning: React Hook useEffect has a missing dependency: 'repos'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/workspaces/new.tsx
64:6  Warning: React Hook useEffect has missing dependencies: 'descriptionQuery', 'nameQuery', and 'reposQuery'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/AddContributorsHeader/add-contributors-header.tsx
39:6  Warning: React Hook useEffect has a missing dependency: 'onSearch'. Either include it or remove the dependency array. If 'onSearch' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/Repositories/AddToWorkspaceDrawer.tsx
62:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/Repositories/AddToWorkspaceModal.tsx
63:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/Workspaces/InsightUpgradeModal.tsx
29:6  Warning: React Hook useEffect has missing dependencies: 'posthog' and 'workspaceId'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/Workspaces/TrackedContributorsWizard/SelectFollowingStep.tsx
29:6  Warning: React Hook useEffect has a missing dependency: 'onToggleContributor'. Either include it or remove the dependency array. If 'onToggleContributor' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/Workspaces/TrackedRepositoryFilter.tsx
15:6  Warning: React Hook useEffect has a missing dependency: 'handleSelect'. Either include it or remove the dependency array. If 'handleSelect' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/Workspaces/WorkspaceBanner.tsx
14:6  Warning: React Hook useEffect has missing dependencies: 'posthog' and 'workspaceId'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/Workspaces/WorkspaceWelcomeModal.tsx
19:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/atoms/SkeletonLoader/skeleton-wrapper.stories.tsx
16:14  Warning: The story should use PascalCase notation: tripleWrappers  storybook/prefer-pascal-case

./components/molecules/AuthSection/auth-section.tsx
50:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
56:6  Warning: React Hook useEffect has a missing dependency: 'userInfo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/ContributorHighlight/contributor-highlight-card.tsx
166:6  Warning: React Hook useEffect has a missing dependency: 'taggedRepoList'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
475:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/ContributorProfileHeader/contributor-profile-header.tsx
396:6  Warning: React Hook useEffect has missing dependencies: 'handleAddToList' and 'selectedList.length'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/HighlightInput/highlight-input-form.tsx
317:6  Warning: React Hook useEffect has a missing dependency: 'fetchAllUserHighlights'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
353:6  Warning: React Hook useEffect has missing dependencies: 'handleGenerateHighlightSummary' and 'taggedRepoList'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
550:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/HubContributorsHeader/hub-contributors-header.tsx
50:6  Warning: React Hook useEffect has missing dependencies: 'contributorSearch' and 'onSearch'. Either include them or remove the dependency array. If 'onSearch' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/molecules/TableHeader/table-header.tsx
58:6  Warning: React Hook React.useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/GitHubTeamSyncDialog/github-team-sync-dialog.tsx
61:6  Warning: React Hook useEffect has a missing dependency: 'loadTeams'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/InsightPage/InsightPage.tsx
131:6  Warning: React Hook useEffect has missing dependencies: 'user?.user_metadata.sub', 'workspaceId', and 'workspacesLoading'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
528:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/SearchDialog/search-dialog.tsx
47:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
81:6  Warning: React Hook useEffect has missing dependencies: 'cursor', 'providerToken', and 'searchTerm.length'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
198:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/TopNav/top-nav.tsx
89:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/organisms/UserRepositoryRecommendations/user-repository-recommendations.tsx
74:6  Warning: React Hook useEffect has a missing dependency: 'getRepoFullNameByInterests'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
78:6  Warning: React Hook useEffect has a missing dependency: 'refreshUserRecommendedRepos'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/shared/AppSidebar/AppSidebar.tsx
220:23  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./lib/hooks/useFilterPrefetch.ts
24:6  Warning: React Hook useEffect has a missing dependency: 'filterOptions'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useSession.ts
48:6  Warning: React Hook useEffect has missing dependencies: 'getSession', 'loadSession', and 'setStoreData'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useSupabaseAuth.ts
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
 βœ“ Linting and checking validity of types    
   Creating an optimized production build ...
error - No Sentry auth token configured. Source maps will not be uploaded.
You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
After generating a Sentry auth token, set it via the SENTRY_AUTH_TOKEN environment variable during the build.

 βœ“ Compiled successfully
 βœ“ Collecting page data    
   Generating static pages (0/8)  [    ]You are on the server
You are on the server
You are on the server
You are on the server
You are on the server
You are on the server
You are on the server
You are on the server
 βœ“ Generating static pages (8/8)
 βœ“ Collecting build traces    
 βœ“ Finalizing page optimization    

Route (pages)                                                               Size     First Load JS
β”Œ Ζ’ /                                                                       315 B           257 kB
β”œ   /_app                                                                   0 B             257 kB
β”œ β—‹ /404                                                                    4.21 kB         303 kB
β”œ β—‹ /500                                                                    1.89 kB         261 kB
β”œ β—‹ /account-deleted                                                        502 B           288 kB
β”œ Ζ’ /api/delete-account                                                     0 B             257 kB
β”œ Ζ’ /api/fetchOGData                                                        0 B             257 kB
β”œ Ζ’ /explore/topic/[pageId]/[toolName]                                      610 B           949 kB
β”œ β—‹ /explore/topic/[pageId]/[toolName]/filter/[...selectedFilter]           606 B           949 kB
β”œ β—‹ /feed                                                                   277 B           510 kB
β”œ Ζ’ /feed/[id]                                                              555 B           511 kB
β”œ Ζ’ /s/[org]/[repo]                                                         98.3 kB         446 kB
β”œ Ζ’ /signin                                                                 334 B           257 kB
β”œ Ζ’ /signout                                                                335 B           257 kB
β”œ Ζ’ /star-search                                                            20.1 kB         357 kB
β”œ Ζ’ /star-search/waitlist                                                   4.67 kB         339 kB
β”œ β—‹ /start                                                                  8.14 kB         309 kB
β”œ Ζ’ /user/[username]                                                        38.1 kB         883 kB
β”œ Ζ’ /user/[username]/card                                                   3.4 kB          303 kB
β”œ β—‹ /user/notifications                                                     6.59 kB         303 kB
β”œ β—‹ /user/settings                                                          10.3 kB         351 kB
β”œ Ζ’ /workspaces/[workspaceId]                                               21.7 kB         546 kB
β”œ Ζ’ /workspaces/[workspaceId]/activity                                      29.2 kB         394 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributor-insights                          9.96 kB         361 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributor-insights/[listId]                 385 B           257 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributor-insights/[listId]/activity        14.6 kB         528 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributor-insights/[listId]/edit            9.36 kB         368 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributor-insights/[listId]/highlights      16.2 kB         490 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributor-insights/[listId]/overview        15.4 kB         886 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributor-insights/new                      8.96 kB         368 kB
β”œ Ζ’ /workspaces/[workspaceId]/contributors                                  9.37 kB         882 kB
β”œ Ζ’ /workspaces/[workspaceId]/repository-insights                           5.52 kB         347 kB
β”œ Ζ’ /workspaces/[workspaceId]/repository-insights/[insightId]/activity      12.3 kB         534 kB
β”œ Ζ’ /workspaces/[workspaceId]/repository-insights/[insightId]/contributors  5.96 kB         895 kB
β”œ Ζ’ /workspaces/[workspaceId]/repository-insights/[insightId]/dashboard     21.7 kB         536 kB
β”œ Ζ’ /workspaces/[workspaceId]/repository-insights/[insightId]/edit          9.15 kB         368 kB
β”œ Ζ’ /workspaces/[workspaceId]/repository-insights/new                       9 kB            368 kB
β”œ Ζ’ /workspaces/[workspaceId]/settings                                      19.8 kB         395 kB
β”” Ζ’ /workspaces/new                                                         9.32 kB         368 kB
+ First Load JS shared by all                                               277 kB
  β”œ chunks/framework-56eb74ff06128874.js                                    45.2 kB
  β”œ chunks/main-f4a17ecc0c9d5004.js                                         36.9 kB
  β”œ chunks/pages/_app-e59ecb79bc89499b.js                                   172 kB
  β”œ css/bdca3dd7443aa63f.css                                                20.1 kB
  β”” other shared chunks (total)                                             2.37 kB

Ζ’ Middleware                                                                80.4 kB

β—‹  (Static)   prerendered as static content
Ζ’  (Dynamic)  server-rendered on demand

npm info ok 

(build.command completed in 37.9s)

@netlify/plugin-nextjs (onBuild event)                        
────────────────────────────────────────────────────────────────


(@netlify/plugin-nextjs onBuild completed in 2.5s)

Functions bundling                                            
────────────────────────────────────────────────────────────────

The Netlify Functions setting targets a non-existing directory: netlify/functions

Packaging Functions from .netlify/functions-internal directory:
 - ___netlify-server-handler/___netlify-server-handler.mjs


(Functions bundling completed in 2.6s)

Edge Functions bundling                                       
────────────────────────────────────────────────────────────────

Packaging Edge Functions from .netlify/edge-functions directory:
 - ___netlify-edge-handler-middleware

Packaging Edge Functions from netlify/edge-functions directory:
 - card
 - repo-page-card
 - workspaces-card

(Edge Functions bundling completed in 3s)

@netlify/plugin-nextjs (onPostBuild event)                    
────────────────────────────────────────────────────────────────


Warning: some headers have syntax errors:

Path should come before header "https"

Path should come before header "X-Robots-Tag"

Path should come before header "http"

Path should come before header "X-Robots-Tag"

Path should come before header "https"

Path should come before header "X-Robots-Tag"

Path should come before header "http"

Path should come before header "X-Robots-Tag"

Path should come before header "https"

Path should come before header "X-Robots-Tag"

Path should come before header "http"

Path should come before header "X-Robots-Tag"

(@netlify/plugin-nextjs onPostBuild completed in 727ms)

@netlify/plugin-nextjs (onSuccess event)                      
────────────────────────────────────────────────────────────────


(@netlify/plugin-nextjs onSuccess completed in 684ms)

@netlify/plugin-nextjs (onEnd event)                          
────────────────────────────────────────────────────────────────


(@netlify/plugin-nextjs onEnd completed in 596ms)

Save updated config                                           
────────────────────────────────────────────────────────────────


(options.onEnd completed in 5ms)

Netlify Build Complete                                        
────────────────────────────────────────────────────────────────

(Netlify Build completed in 51.1s)

@nickytonline
Copy link
Member Author

I'm currently investigating file sizes in the .netlify folder to see if anything stands out. I can't upload the result of find . -type f -exec stat -f '%N %.1f KB' '{}' + though. It makes the comment too big. πŸ˜…

Same for the .next folder when I run find . -type f -exec stat -f '%N %.1f KB' '{}' +.

@nickytonline
Copy link
Member Author

nickytonline commented May 9, 2024

So it looks like 14.1.1 works fine, but 14.2.x versions cause out of memory error issues @MarcL @ascorbic. Again, locally via ntl build all good, but no dice on Netlify.com for a deploy. Just FYI.

I could allocate more memory to Node.js, but that seems kind of hacky since it only starts happening in 14.2.x.

@nickytonline
Copy link
Member Author

So it looks like 14.1.1 works fine, but 14.2.x versions cause out of memory error issues @MarcL @ascorbic. Again, locally via ntl build all good, but no dice on Netlify.com for a deploy. Just FYI.

I could allocate more memory to Node.js, but that seems kind of hacky since it only starts happening in 14.2.x.

Looks like I could go as high as 14.1.4 for now.

@nickytonline nickytonline force-pushed the nickytonline/upgrade-next-14 branch from 7a652da to 00d67bf Compare May 9, 2024 23:44
@MarcL
Copy link

MarcL commented May 10, 2024

@nickytonline - We'll have a look at the runtime to see what's up.

@pieh
Copy link

pieh commented May 10, 2024

So it looks like 14.1.1 works fine, but 14.2.x versions cause out of memory error issues @MarcL @ascorbic. Again, locally via ntl build all good, but no dice on Netlify.com for a deploy. Just FYI.

I could allocate more memory to Node.js, but that seems kind of hacky since it only starts happening in 14.2.x.

The OOM I looked at ( https://app.netlify.com/sites/oss-insights/deploys/663d2b98d286670008400d65#L2275-L2293 ) seems to happen during next build (in particular during Creating an optimized production build step which should be creating various bundles) and at this point runtime didn't do much except for restoring cache and setting some env vars, so at first glance it looks more like somehow Next.js need more resources with new version (?)

This is totally random but seeing some Sentry logs before OOM maybe this could be related getsentry/sentry-javascript#10468 ? Worth a try using their disableServerWebpackPlugin workaround with latest next to at least "try something"?

PS. Hi Nick! :)

@nickytonline
Copy link
Member Author

Hi @pieh! Thanks for digging in a bit!

Yeah it does sound like it could be the Sentry issue you linked. I wasn't aware of that issue but we've also been on 13.x until now. πŸ˜…

@nickytonline nickytonline requested review from bdougie, zeucapua and jpmcb and removed request for a team May 10, 2024 12:34
Copy link
Member

@bdougie bdougie left a comment

Choose a reason for hiding this comment

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

Let's move this forward and move the 14.2 debugging to a separate issue.

@nickytonline
Copy link
Member Author

nickytonline commented May 10, 2024

Let's move this forward and move the 14.2 debugging to a separate issue.

Yeah agreed. We don't need to be on the latest 14.x version anyway. I will keep tabs on the 14.2.x issue though.

@nickytonline nickytonline merged commit da741bf into beta May 10, 2024
13 checks passed
@nickytonline nickytonline deleted the nickytonline/upgrade-next-14 branch May 10, 2024 14:43
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.

Feature: Upgrade to Next.js 14
7 participants