#cookie parse error on action

19 messages · Page 1 of 1 (latest)

blazing timber
#

Hello, qwik noob here, kicking the tires for the first time, and looks great so far!

When posting action (programmatically) using globalAction$, I get an error, which prevents the action from getting called server-side:

QWIK ERROR SyntaxError: The requested module '/node_modules/.pnpm/[email protected]/node_modules/cookie/index.js?v=a2c686e9' does not provide an export named 'parse'

Any ideas?

Also, it appears the code is well ahead of the docs, with lots of deprecation warnings, etc. Is there a recommended version to be on? E.g., globalAction isn't even documented so perhaps I'm calling it wrong? I'm on:

"@builder.io/qwik": "0.20.1",
"@builder.io/qwik-city": "0.5.2",

Any words of wisdom much appreciated 🙂 Thx!

blazing timber
#

edit: in second thought, this is prob an express issue (I'm configured for express); still curious to know what ver folks are on -- also getting error when I try to preview:
TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module "@qwik-city-plan"

blazing timber
#

yes, seems to be an express issue so I'll file bug (was create using create qwik@latest, then run quick add to add in express -- both problems above go away when I create vanilla config w/ no add-ins.

sudden knot
#

Are you by chance also trying to use qwik-auth?

blazing timber
#

y, if you mean @auth/core

sudden knot
#

I'm on my phone so it's hard to find the example, but add @auth/core as an optimizedDep in your vite config

blazing timber
#

Thanks @sudden knot , much appreciated -- I'll take a closer look. I'm literally looking at qwik for first time today (been also evaluating solid-start and sveltekit) and looks really great -- I'm loving that patterns so far

sudden knot
#

There is a new qwik-auth package coming that are some handy hooks for using @auth/core

blazing timber
#

oh, great to hear!! tflmk. auth is one of this go/no-go factors for me so appreciate the tip

#

I found this and seems like close (I'm getting redir url doesn't match error even though it does), so getting close I think but I set that aside earlier so I could check out how state management and loader/actions work -- would be great if there was a @auth/quik equivalent to solid, svelte, but would keep ears open for updates. thanks again!! https://github.com/wmalarski/qwik-authjs-example/blob/master/src/lib/index.ts
https://qwik.builder.io/media/

GitHub

Next-Auth.js + Qwik example integration. Contribute to wmalarski/qwik-authjs-example development by creating an account on GitHub.

Qwik

No hydration, auto lazy-loading, edge-optimized, and fun 🎉!

sudden knot
#

qwik-auth is essentially the equivalent of those. You can install it now, but it has a couple of errors. The previously mentioned vite config being one of them. pnpm qwik add select auth.

blazing timber
#

cool. I'll follow it. super appreciate the info!! btw, what's protocol in this room for closing out issues, etc? slash what? I'm new here so want to be on board. thanks again!

sudden knot
#

I think you can mark the post as solved. But most people don't. I'm heading to bed now but happy to help you out tomorrow if you post in this thread or message me regarding this auth stuff.

blazing timber
#

thx again!!

blazing timber
#

Hi @sudden knot , qwik-auth provider works like a charm. thanks for pointing me to it 🙂 I tried out today because so version bump, but seem still need the vite workaround mentioned here https://gilfink.medium.com/adding-authentication-to-a-qwik-app-74c082521f99 ... but I'm happy :0) I'll file a ticket on git because the [email protected] file re-exported members no longer match qwik-auth.

Medium

Authentication is a basic feature that is implemented in most of the apps and websites. Today there are many ways to authenticate users and…

#

Thx again for the ptr.

blazing timber
#

Well, spoke a little too soon :0/ when I run a preview build after adding auth0, I get @qwik-city-plan" is not a valid package name -- just went to file issue and see you filed same already. Ty!

#

thx for the workaround