Nuxt/Nitro deployment fails: RollupError: "randomBytes" is not exported by ... crypto

Please help me to fix the following error:

23:03:36.605	[info] [nitro] Building Nitro Server (preset: `cloudflare-pages`)
23:03:51.017	[error] [nitro] RollupError: "randomBytes" is not exported by "node_modules/unenv/runtime/node/crypto/index.mjs", imported by ".nuxt/dist/server/server.mjs".
23:03:51.018	22: import { inspect, TextEncoder } from "util";
23:03:51.018	23: import { getModularInstance, FirebaseError, getDefaultEmulatorHostnameAndPort, createMockUserToken } from "@firebase/...
23:03:51.018	24: import { randomBytes as randomBytes$1 } from "crypto";
23:03:51.018	             ^
23:03:51.018	25: import { Integer, Md5 } from "@firebase/webchannel-wrapper";
23:03:51.018	26: import * as grpc from "@grpc/grpc-js";
23:03:51.021	[error] "randomBytes" is not exported by "node_modules/unenv/runtime/node/crypto/index.mjs", imported by ".nuxt/dist/server/server.mjs".
23:03:51.021	  at error (node_modules/rollup/dist/es/shared/node-entry.js:2125:30)
23:03:51.021	  at Module.error (node_modules/rollup/dist/es/shared/node-entry.js:13438:16)

Node version in my settings: 17.9.1
I suppose the problem popped up after adding new packages like vuefire and nuxt-vuefire

Then the first thing I might try is removing the new packages and testing to ensure everything works. Have you tried (a production) build on your local machine? Does it build correctly even with these new packages added?

Are you running the same version locally and in Cloudflare Pages?

This version works correctly on my local machine and also on Netlify.
I can’t remove the libraries, because I need them for my new functionality. Addition of these libraries was practically the only change that I’ve made in this version.
Locally I’m using the most recent version of NodeJS.

Latest as in v18? Have you tried setting the version used on Cloudflare to the same version you are running locally?

Yes, I’ve changed NODE_VERSION to 18.16.0 - it did not help, error remains the same