bnason
bnason
Explore posts from servers
CDCloudflare Developers
Created by bnason on 6/25/2024 in #workers-help
Error 1101 on code surrounded by try/catch
I'm deploying a Nuxt.js application and my pages event handler is being called but somehow seems to just "stop" executing code and I get the Error 1101 message. The reason I say stop is that I've added console.log lines between every single statement to pinpoint what is going on and the entire thing is wrapped in a try catch block but the catch is never being called.
4 replies
NNuxt
Created by bnason on 6/24/2024 in #❓・help
Import is undefined
I have a very weird problem where only in my production build is a modules imported module undefined. I'm importing samlify and it is importing parts of node-forge, however in the dist chunk, the node-forge object does not have most of the imported code there. I'm really at a loss as to what is going on here.
1 replies
CDCloudflare Developers
Created by bnason on 6/24/2024 in #workers-help
import is undefined
I'm using a package called samlify which has imports some items from package node-forge,. For some reason, the node-forge imports are undefined in the cloudflare worker. I'm getting an error TypeError: Cannot read property of undefined (reading 'decode64') .... Can anyone help?
4 replies
CDCloudflare Developers
Created by bnason on 6/22/2024 in #workers-help
SAML
I'm looking for a SAML typescript library for my Nuxt pages/worker app. I'm currently trying to use samlify but I'm getting a 500 error Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler. and I believe it's causing it.
2 replies
NNuxt
Created by bnason on 6/22/2024 in #❓・help
Environment dependent middleware
Is it possible to create a server middleware that is not deployed in production? Specifically I am deploying to CloudFlare and do not want to use my access log plugin that uses morgan.
3 replies
NNuxt
Created by bnason on 6/21/2024 in #❓・help
Express compatible request object
Is there an Express compatible request object available from a server route? I am trying to integrate samlify and it needs to parse the request but it seems the nitro request object is incompatible.
27 replies
NNuxt
Created by bnason on 6/21/2024 in #❓・help
Create new v4 app
I'd like to play around with whats out there for v4, how can I create a new application immediately using v4?
8 replies
NNuxt
Created by bnason on 6/18/2024 in #❓・help
nuxi upgrade --force not working
When I run npx nuxi@latest upgrade --force it shows what updates are available, but does not apply them to my package.json. The only thing I can think of is that my dependencies are fixed to specific versions in package.json so I don't accidentally upgrade unknowingly. Since the deps aren't specified as a range, does that prohibit nuxi from upgrading correctly?
2 replies
NNuxt
Created by bnason on 9/21/2023 in #❓・help
Server side worker thread
Is it possible/safe to create a server side worker thread for a long running up intensive task? If multiple of these tasks run, it slows down the responsiveness of the web interface. Hopefully moving them to their own threads should resolve that
10 replies
NNuxt
Created by bnason on 7/17/2023 in #❓・help
Unable to load module augmentation
I'm trying to use module augmentation to modify a third party library. I'm importing the file in my application, but I think the nuxt compilation process is stripping it out. Is there a specific place I need to put it and load it from?
1 replies
NNuxt
Created by bnason on 5/24/2023 in #❓・help
Underscore in runtimeConfig not loading env var
My nuxt config has effectively the following runtimeConfig: { foo_bar: '' } which should allow me to set via env vars using NUXT_FOO__BAR="baz" but it is not being loaded.
1 replies