next.js: Build error - Cannot get final name for export 'encodeXML'

Link to the code that reproduces this issue

https://github.com/mr-scrpt/stackoverflow/tree/26_06-edit-profile

To Reproduce

Start app pnpm build or yarn build or npm build

Current vs. Expected behavior

Current Failed to compile.


./node_modules/.pnpm/cheerio@1.0.0-rc.12/node_modules/cheerio/lib/esm/index.js + 69 modules
Cannot get final name for export 'encodeXML' of ./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/index.js


> Build failed because of webpack errors
   Creating an optimized production build  . ELIFECYCLE  Command failed with exit code 1.

Expected Build app

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 8.10.0
Relevant Packages:
  next: 14.0.4-canary.4
  eslint-config-next: 14.0.1
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Additional context

Everything was working correctly a few days ago. Today I noticed a problem. Initially the project was on next 14.0.1, later I upgraded it to 14.0.3, tried downgrade to 14.0.1 and upgrade to 14.0.4-canary.4 - didn’t solve the problem. Google says that I need to downgrade Resend package to version 1, but I don’t use this package No problems detected in development mode

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Reactions: 7
  • Comments: 23 (7 by maintainers)

Most upvoted comments

Google says that I need to downgrade Resend package to version 1, but I don’t use this package

I am using resend and ran into this. I thought I would share the links to the issues over there for anyone else who comes across this issue. It might also help to uncover a root cause?

The resolution from https://github.com/resendlabs/resend-node/issues/256 is to upgrade resend to "^2.1.0-canary.1". The PR with the fix - https://github.com/resendlabs/resend-node/pull/259