Unable to use Edge Runtime with ioredis
(simplified log)
01:11:23.508 | â–² â–² Next.js 14.2.5
01:11:23.508 | â–²
01:11:23.509 | â–² Linting and checking validity of types ...
01:11:28.874 | â–² Creating an optimized production build ...
01:11:38.609 | â–² Failed to compile
01:11:38.609 | â–² ./node_modules/.pnpm/[email protected]/node_modules/ioredis/built/ScanStream.js:3:1
01:11:38.609 | â–² Module not found: Can't resolve 'stream'
01:11:38.610 | â–² ./node_modules/.pnpm/[email protected]/node_modules/ioredis/built/Script.js:3:1
01:11:38.610 | â–² Module not found: Can't resolve 'crypto'
01:11:38.612 | â–² ./node_modules/.pnpm/[email protected]/node_modules/ioredis/built/cluster/ClusterOptions.js:4:1
01:11:38.612 | â–² Module not found: Can't resolve 'dns'
01:11:38.614 | â–² ./node_modules/.pnpm/[email protected]/node_modules/ioredis/built/cluster/util.js:5:1
01:11:38.614 | â–² Module not found: Can't resolve 'net'
01:11:38.616 | â–² ./node_modules/.pnpm/[email protected]/node_modules/ioredis/built/connectors/SentinelConnector/index.js:4:1
01:11:38.617 | â–² Module not found: Can't resolve 'net'
Upon adding the Edge Runtime to the code that I'm using, it breaks ioredis as it has modules that do not support the Edge Runtime, and since the code I'm using requires the Edge Runtime to work with the hosting provider I'm using (Cloudflare Pages), there isn't much that I can do. Plus, this isn't my code, so I can't change anything.
Did anyone resolve the issue in any way?
Did anyone resolve the issue in any way?
As far as I can tell, probably not. The project I was using was OneDrive Vercel Index, however I ended up switching to OneDrive Cloudflare Index instead as then I didn't have to transfer all of the Vercel stuff to Cloudflare myself. Anyways, maybe this has been fixed since then though? But I haven't taken a look.
Im still facing the same problem here with [email protected] and [email protected]
facing same error