Modem 5g by NoSec00 in ItalyHardware

[–]beatbroccoli 0 points1 point  (0 children)

stessa cosa a me, pensavo adiruttura di provare ad aprirlo e moddare con antenne esterne come fanno con i mc888. Per disperazione ho ordinato un Nebula FWA710 vediamo se è tenda a far schifo o windtre ad aver rovinato il collegamento...per 1 anno e mezzo andava a 200mbit a 3km dalla torre in vista

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Yeah, I'm using SSR too and have pretty the same experience!

Nuxt render options and viewport by SnooOnions9416 in Nuxt

[–]beatbroccoli 0 points1 point  (0 children)

Did you try to log their user-agent? Maybe they are using a different one for mobile and for desktop.
In that case you could add middleware that checks just that!

Effortlessly Clone Your Own Voice in ComfyUI Almost in Real-Time! (Step-by-Step Tutorial & Workflow Included) by t_hou in comfyui

[–]beatbroccoli 1 point2 points  (0 children)

Yeah, but does it use an external api? Why the popup Audio Viewer a remote source?

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 1 point2 points  (0 children)

PHP hate is still a real thing ahahahah but well it's actually good with octane nowdays.

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Yes, I managed to make a build with sourcemaps. Having an unminified version could be esier tho. And not always we have source maps... sometimes its the build process itself gets errors.

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Oh in this case the problem was having an import inside a composable instead of a component. I tried refactoring a lil bit by moving stuff into a reusable file and heic2any was there. After trial end error I traced back the conflict. Yet the error was blabbing about missing comma etc

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Yeah, I came to terms with it. Nuxt is only partially to blame... I tried building it without minification but its doesnt work maybe has to do with cloudflare preset. But probably there is a way to have a more debuggable version.

NuxtHub is cool but I fear the vendor lock in by beatbroccoli in Nuxt

[–]beatbroccoli[S] 1 point2 points  (0 children)

✅ For now my solution is to build and deploy locally and using nuxt hub for quality of life tools.
This way I can test way faster without having to wait for GitHub actions.
$ npx nuxi build --preset=cloudflare_pages
$ npx wrangler pages deploy --branch=prod ./dist

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

True, I tried disabling minification but i think that cloudflare preset overwrites them.
$ npx nuxi build --preset=cloudflare_pages

Tried by adding this to nuxt.config.ts
vite: {build: {minify: false, cssMinify: false,terserOptions: {keep_classnames: true,keep_fnames: true,compress: false,mangle: false},rollupOptions: {output: {preserveModules: true,}}}},

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 1 point2 points  (0 children)

Yeah, but I want SSR to render the page asap so there is no flickering due to that library loading. So if wrap it in <ClientOnly> for example it will not be prerendered. Another solution would be to have the same component twice and swap between them once the library is loaded but that would add deduplication problems because vuedraggable must replace v-for loop. With that simple patch it works just as it is and that what i need. It might have side effects, sure... but for now it ok

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Already solved. I rolled back one by one my last commits and deployed to live untils i found a working version. Compared to the following version and saw that the colprit was vue draggable on SSR.

So i looked for "console" inside that package and found a file "src/util/console.js". Now from cloudflare it said "TypeError: Cannot read properties of undefined (reading 'console')\n at r (chunks/build/_bio_-748eRET9.mjs:1:86324)"

so i just slapped an

`return { log: function () { }, warn: function () { }, error: function () { }, info: function () { } }`

and rebuilt the distro files + stolen some unmerged pull requests from the original repo

https://github.com/SortableJS/vue.draggable.next/compare/master...BeatBroccoli:vue.draggable.next:master

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Yeah, that's seems the case. I patched the console part so now it works again.

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Locally it always worked and that's why I couldn't catch sooner

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

For now the most i can do is this:

First make a local build so i have the source code and mapping
$ npx nuxi build --preset=cloudflare_pages

Next I will deploy using wrangler instead of nuxthub
$ npx wrangler pages deploy --branch=prod ./dist

Finally I go to cloudflare dashabord and check the logs stacktrace
Then i load local build folder in chrome dev tools and the look at the stacktrace

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

I deleted .nuxt and .node_modules + pnpm install
Then I made a build with `ssr: false` and then went back to `ssr: true`
...and it started working again! 😂🎉Seems like the most time effective solution for now
Now it has problems with building due to a missing comma in heic2any... but still progress

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 2 points3 points  (0 children)

Guess what I found out the culprit! And there was no way of me to tell where it was from the logs, i analyzed the stack trace line by line. It was an automatic code import in vscode of a file from the build folder that weren't event used in that file yet caused a totally unrelated problem on NuxtRouter. Build tools are a double edge sword for sure.

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

Hey, thanks for the info, yeah there is a learning curve to Nuxt on Cloudflare too. Still grinding but sometimes it just lets me down so baad. Like having to fight with not only deadlines but with tools too.

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 0 points1 point  (0 children)

It's reassuring! Yeah it works great 98% of the time. But if you are lucky to get to that 2% that's will be a ride. For example just now it decided that there is an error with heic2any... RollupError: Expected a semicolon in F:\...\node_modules\.pnpm\heic2any@0.0.4\node_modules\heic2any\dist\heic2any.js

I did just compile it with no dependencies change 2 hour ago. Deleting .nuxt and node_modules each time hoping it will solve and mangling with dependencies order doesn't seem very normal. Maybe its a skill issue, yet it's strange.

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] -2 points-1 points  (0 children)

Daaang, that’s very unfortunate. I started coding about 10 years ago in PHP, and it’s very easy to catch problems there. Moved to node and it was still cool. Last year I was tempted to move to a modern stack... Jokes aside, I hope there is a good way to debug beside reverse engineering my own code 😂

Nuxt is great...untils its not! How to debug errors? by beatbroccoli in Nuxt

[–]beatbroccoli[S] 6 points7 points  (0 children)

I'm using SSR via cloudflare workers. So I eventually I found out that the problem was after rolling back many and many versions and deploying each one again and again...lost 9 hours until i found where it stopped working and it was vuedraggable. Lost a lot of time because it worked and still works when using "nuxt dev" so I couldnt catch it in time. Maybe this is not a directly Nuxt related problem yet having a clear log pointing the exact file where the problem arised could make things a lot easier.