Rebuild app after dependencies update

Hi all. I made big update to my app - I upgraded Next to 15 version, updated many packages etc. After deploying, I see error in functions log. But I fixed that error and in my local environment it builds and works without error. I tried to redeploy with clear cache options. nothing happened
Is there any way to rebuild app without caching? Fresh build from scratch works correctly

You can rebuild the site with a cleared cache on the deploys page. To do so, navigate to project > deploys > trigger deploy > clear cache and deploy project.

Yeah, tried it - didn’t help
It seems that there are sort of netlify cache?

Chat GPT says that the problem is Netlify deploy into AWS Lambda. So, when I test in my local environment, it works under one Node.js proccess. But inside neltlify the app deploys into several AWS Lambda functions, so it splits into different processed which cause duplicated module problem

You’ve not provided any useful details for anyone to be able to help you.

I don’t know what details are needed to be useful to fix the issue.
Me app: https://stage.aniw.net/
I have Js module called CKeditor installed in my app. It is only client component. It causes this exception:

ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"CKEditorError: ckeditor-duplicated-modules\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules","reason":{"errorType":"CKEditorError","errorMessage":"ckeditor-duplicated-modules\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules","context":null,"name":"CKEditorError","stack":["CKEditorError: ckeditor-duplicated-modules","Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules"," at 47610 (/var/task/.next/server/chunks/7327.js:2:208)"," at t (/var/task/.next/server/webpack-runtime.js:1:128)"," at 14878 (/var/task/.next/server/chunks/3730.js:1:866)"," at t (/var/task/.next/server/webpack-runtime.js:1:128)"," at 92532 (/var/task/.next/server/chunks/1565.js:5:13127)"," at t (/var/task/.next/server/webpack-runtime.js:1:128)"," at 57417 (/var/task/.next/server/app/files/create-file/page.js:1:1712)"," at Function.t (/var/task/.next/server/webpack-runtime.js:1:128)"," at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: CKEditorError: ckeditor-duplicated-modules","Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules"," at process.<anonymous> (file:///var/runtime/index.mjs:1294:17)"," at process.emit (node:events:530:35)"," at emitUnhandledRejection (node:internal/process/promises:252:13)"," at throwUnhandledRejectionsMode (node:internal/process/promises:388:19)"," at processPromiseRejections (node:internal/process/promises:475:17)"," at process.processTicksAndRejections (node:internal/process/task_queues:106:32)"]}

The issue happens only in netlify. In the local build, everything works correctly. I tried to build and use app locally - it works, but after deploying to netlify it crushes. I don’t know hot to fix it because it appears only in netlify

The error seems to be coming from your dependency. Based on the link provided by them, you should be checking this: Error codes | CKEditor 5 Documentation. Quoting:

This error is thrown when, due to a mistake in the way CKEditor 5 was installed, imported, or initialized, some of its modules were evaluated and executed twice. Duplicate modules inevitably lead to runtime errors and increased bundle size.

Have you checked how you’re importing/installing the library? Did you try checking if other users are reporting some similar errors? If everything else works well, could you try creating a minimal Next.js site and importing the library in it?

“could you try creating a minimal Next.js site and importing the library in it?”

You mean, only to deploy in on netlify?

Yes. I don’t see any other ways to debug the issue without a minimal reproduction. If the reproduction works elsewhere and not on Netlify, we can inspect it and see what could be the issue.

The app works in local environment - it builds and runs without errors. Only after deploying on netlify it crushes in runtime

Local environment is significantly different than production.

What do you mean? I make project build and than check that build running

About this, @playerro:

What he means is that it is improbable that your local system is set up identically to the deployed site at Netlify. If they were identical, the behavior would be identical and it is not. So, there is some difference and, as only you can see your local system, no one but you can find what that difference might be.

What Hrishikesh is asking for is is something known as a “minimal reproduction”. A minimal reproduction has the following qualities in most cases:

  • it is a public repository hosted with a Git host Netlify supports (GitHub, GitLab, or Bitbucket)
  • the public repository has only the code required to trigger the error or incorrect behavior - it is not a 1:1 copy of the repo with the error - it is a stripped down version that only contains the minimum amount of code required to trigger the error
  • the repository does not contain any private code or information (so it can be made public and shared with us here)

Would you be willing to please make minimal reproduction for this issue?