chakra-ui / panda

🐼 Universal, Type-Safe, CSS-in-JS Framework for Product Teams ⚡️
https://panda-css.com
MIT License
5.23k stars 236 forks source link

When I try to upgrade from 0.39.1 to 0.45.2. I get this error when trying to deploy on Vercel: #2864

Closed juliomuhlbauer closed 2 months ago

juliomuhlbauer commented 2 months ago

When I try to upgrade from 0.39.1 to 0.45.2. I get this error when trying to deploy on Vercel:

Error [ERR_REQUIRE_ESM]: require() of ES Module /vercel/path0/node_modules/nanoid/non-secure/index.js from /vercel/path0/node_modules/@pandacss/core/node_modules/postcss/lib/input.js not supported.
Instead change the require of index.js in /vercel/path0/node_modules/@pandacss/core/node_modules/postcss/lib/input.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/vercel/path0/node_modules/@pandacss/core/node_modules/postcss/lib/input.js:6:18) {
  code: 'ERR_REQUIRE_ESM'
}
Node.js v20.17.0
error: prepare script from "reland" exited with 1
Error: Command "bun install" exited with 1

image

Originally posted by @juliomuhlbauer in https://github.com/chakra-ui/panda/discussions/2837

juliomuhlbauer commented 2 months ago

I use nanoid (version 5.0.6), but it is working fine with Panda version 0.39.1. This error only shows up when I try to upgrade to Panda to 0.45.2.

And the error message says: Instead change the require of index.js in /vercel/path0/node_modules/@pandacss/core/node_modules/postcss/lib/input.js to a dynamic import() which is available in all CommonJS modules. So there is something in this path: /vercel/path0/node_modules/@pandacss/core/node_modules/postcss/lib/input.js

segunadebayo commented 2 months ago

Please forward this issue to Next.js or Vercel.

Nothing changed on our end as far as the build is concerned.