You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can mark the path "uuid" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
### Steps to reproduce
1. clone [email protected]:gethassaan/opennextjs-cloudflare-uuid-issue.git
2. add cloudflare credentials in `.env.local`
3. npm run preview
### Expected behavior
Preview / deployment should not fail with the `uuid` error and build should run smoothly.
### @opennextjs/cloudflare version
0.3.3
### Wrangler version
3.99.0
### next info output
```shell
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.2.0: root:xnu-11215.61.5~2/RELEASE_ARM64_T8103
Available memory (MB): 16384
Available CPU cores: 8
Binaries:
Node: 22.9.0
npm: 10.9.0
Yarn: 1.22.22
pnpm: N/A
Relevant Packages:
next: 15.1.3 // Latest available version is detected (15.1.3).
eslint-config-next: 15.1.3
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.2
Next.js Config:
output: N/A
```
### Additional context
The build completes without any errors for me, but when I try to deploy or run the preview using `wrangler deploy` or `wrangler dev --port 8771` it thorws an error of `Could not resolve "uuid"`.
The text was updated successfully, but these errors were encountered:
gethassaan
changed the title
[BUG] [ERROR] Build failed with 1 error: [ERROR] Could not resolve "uuid"
[BUG] [ERROR] Could not resolve "uuid"
Jan 3, 2025
Describe the bug
.open-next/.next/standalone/node_modules/@smithy/middleware-retry/dist-cjs/index.js:51:26: 51 │ var import_uuid = require("uuid");
The module "./dist/commonjs-browser/index.js" was not found on the file system:
.open-next/.next/standalone/node_modules/@smithy/middleware-retry/node_modules/uuid/package.json:34:19: 34 │ "require": "./dist/commonjs-browser/index.js"
The text was updated successfully, but these errors were encountered: