Cloudflare build preset Error
Am trying to test deploy my app on cloudflare following this guide
https://neon.tech/blog/build-and-deploy-global-serverless-nuxt-ssr-app-with-cloudflare-hyperdrive-and-postgres
and receiving this error on the build part
this error only happens when i have the following preset set
`
Neon
Build and Deploy a Global Serverless Nuxt SSR App with Cloudflare H...
Introduction In this post, we’ll create and deploy a Nuxt fullstack application on Cloudflare Pages that uses server routes (API endpoints) to access Neon Serverless Postgres with Cloudflare Hyperdrive. Cloudflare Hyperdrive, now Generally Available, is a serverless application that proxies and accelerates queries to your database. This makes it...
17 Replies
Instead of running Hono in Nuxt I'd simply go for nitro there 🙂
i am just using it as a guide to how to deploy
i am usig Nuxt3 / nitro
i tried to deploy without the presset but still same issue
for deploying, setting the preset should be fine. What is using
readable-stream
in your app (pnpm why readable-stream
or npx npm-why readable-stream
)apparently those
nice and interesting "Why" module to know about
so it is probably angry with bcrypt is my guess ?
Do you use it in the client side? Then probably 😁
You can try the experimental client side polyfill there though
nah, currently i am using only nitro in nuxt3 ( server side only )
That sounds like a bug then! Can you try reproducing as small as possible and raise an issue?
hmmmmm
the previous picture is probably a mistake since i used npm-why, while i was using yarn
this should be it,
the issue is winston logger then ?
i tried to create a clean project anyway and repredouce the bug
though i am now recieveing a different bug....
i tried
yarn why @mapbox
but it doesn't seem to work
and i have no clue from where did this mock-aws-s3 came
but tried yarn why mock-aws-s3
and nothingswaping to bcryptjs solved the "mock-aws-s3" as there seems to be an issue with external packages (bundling/bulding with )
but ...
difference in ms
so am pretty sure now the issue is with winston logger
https://github.com/winstonjs/winston/issues/1585
according to this , i tried to use npm. but same issue
GitHub
Error during building process of server app via winston 3.2 · Issue...
Please tell us about your environment: _winston version 3.2 winston@2 winston@3 _node -v outputs: 11.8.0 or 9.11.1 Operating System? (macOS) Language? (TypeScript 3.2.4) What is the problem? I have...
after many debugging trials ...
it seems to me that the cloudflare preset have issues building libraries that they them self are requiring "readable-stream" library
issue present for me in
pino
and in winston
loggers
which both require readable-stream
tried with npm and yarn
doesn't seem to me to be related to any of themFeel free to raise that but nitro + unenv should handle that AFAIK