© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•3y ago•
4 replies
Eusebio Trigo

Error building pages Module build failed: UnhandledSchemeError: Reading from "node:crypto"

Hi team,
I´m trying to move my NextJs app from Vercel to Pages and i´m getting several errors when building my application:

Failed to compile.
12:58:58.301 ▲ node:crypto
12:58:58.302 ▲ Module build failed: UnhandledSchemeError: Reading from "node:crypto" is not handled by plugins (Unhandled scheme).
12:58:58.302 ▲ Webpack supports "data:" and "file:" URIs by default.
12:58:58.302 ▲ You may need an additional plugin to handle "node:" URIs.

...


12:58:58.304 ▲ node:fs/promises
12:58:58.305 ▲ Module build failed: UnhandledSchemeError: Reading from "node:fs/promises" is not handled by plugins (Unhandled scheme).
12:58:58.305 ▲ Webpack supports "data:" and "file:" URIs by default.
12:58:58.305 ▲ You may need an additional plugin to handle "node:" URIs.

And several more.

It seems it is related to using formidable (https://github.com/node-formidable/formidable). Is there anything I should change somewhere to make it work?
I use formidable in some functions in the pages/api folder to read the form content.

Thanks!
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

building pages failed
Cloudflare DevelopersCDCloudflare Developers / pages-help
2y ago
pages build error
Cloudflare DevelopersCDCloudflare Developers / pages-help
3y ago
Build failed on Cloudflare Pages.
Cloudflare DevelopersCDCloudflare Developers / pages-help
2y ago
Cloudflare Pages build error
Cloudflare DevelopersCDCloudflare Developers / pages-help
13mo ago