Jay
Jay
CDCloudflare Developers
Created by Edward on 3/27/2024 in #pages-help
Need Help - Remix + Vite (Cloudflare Pages)
Ah...fixed it. Instead of using @remix-run/node you have to switch to @remix-run/cloudflare.
7 replies
CDCloudflare Developers
Created by Edward on 3/27/2024 in #pages-help
Need Help - Remix + Vite (Cloudflare Pages)
[ERROR] Could not resolve "crypto"
14:19:14.295
14:19:14.295 ../../node_modules/.pnpm/[email protected]/node_modules/cookie-signature/index.js:5:21:
14:19:14.295 5 │ var crypto = require('crypto');
14:19:14.295 ╵ ~~~~~~~~
14:19:14.296
14:19:14.296 The package "crypto" wasn't found on the file system but is built into node.
14:19:14.296 Add the "nodejs_compat" compatibility flag to your Pages project and make sure to prefix the module name with "node:" to enable Node.js compatibility.
14:19:14.296
14:19:14.296
14:19:14.296 ✘ [ERROR] Could not resolve "stream"
14:19:14.296
14:19:14.296 ../../node_modules/.pnpm/[email protected]/node_modules/stream-slice/index.js:3:24:
14:19:14.296 3 │ var Transform = require('stream').Transform;
[ERROR] Could not resolve "crypto"
14:19:14.295
14:19:14.295 ../../node_modules/.pnpm/[email protected]/node_modules/cookie-signature/index.js:5:21:
14:19:14.295 5 │ var crypto = require('crypto');
14:19:14.295 ╵ ~~~~~~~~
14:19:14.296
14:19:14.296 The package "crypto" wasn't found on the file system but is built into node.
14:19:14.296 Add the "nodejs_compat" compatibility flag to your Pages project and make sure to prefix the module name with "node:" to enable Node.js compatibility.
14:19:14.296
14:19:14.296
14:19:14.296 ✘ [ERROR] Could not resolve "stream"
14:19:14.296
14:19:14.296 ../../node_modules/.pnpm/[email protected]/node_modules/stream-slice/index.js:3:24:
14:19:14.296 3 │ var Transform = require('stream').Transform;
7 replies
CDCloudflare Developers
Created by Edward on 3/27/2024 in #pages-help
Need Help - Remix + Vite (Cloudflare Pages)
I am also running into this issue...'stream' and 'crypto' are required somehow in node.js packages and I can't access the original files.
7 replies