CLOUDFLARE WORKERS NOT WORKING!!! - URGENT!!!
I was trying to deploy our website to Cloudflare Workers, why is it not working?
Here is the error code:
Here is the error code:
X [ERROR] Build failed with 1 error:
X [ERROR] Could not resolve "@mongodb-js/saslprep"
.worker-next/.next/standalone/node_modules/mongoose/node_modules/mongodb/lib/cmap/auth/scram.js:4:27:
4 │ const saslprep_1 = require("@mongodb-js/saslprep");
╵ ~~~~
The module "./dist/browser.js" was not found on the file system:
.worker-next/.next/standalone/node_modules/@mongodb-js/saslprep/package.json:33:17:
33 │ "default": "./dist/browser.js"
╵ ~~~~~
You can mark the path "@mongodb-js/saslprep" 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.X [ERROR] Build failed with 1 error:
X [ERROR] Could not resolve "@mongodb-js/saslprep"
.worker-next/.next/standalone/node_modules/mongoose/node_modules/mongodb/lib/cmap/auth/scram.js:4:27:
4 │ const saslprep_1 = require("@mongodb-js/saslprep");
╵ ~~~~
The module "./dist/browser.js" was not found on the file system:
.worker-next/.next/standalone/node_modules/@mongodb-js/saslprep/package.json:33:17:
33 │ "default": "./dist/browser.js"
╵ ~~~~~
You can mark the path "@mongodb-js/saslprep" 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.