Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

context error in cart #3

Open
bdodroid opened this issue Oct 5, 2023 · 0 comments
Open

context error in cart #3

bdodroid opened this issue Oct 5, 2023 · 0 comments

Comments

@bdodroid
Copy link

bdodroid commented Oct 5, 2023

Tried running this locally and hit this error:

   An error occured during route handling or page rendering. TypeError: Cannot read properties of undefined (reading 'context')
    at j (deno/hooks.js:2:1028)
    at br (swr@1.3.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0CmUvcHJlYWN0L2NvbXBhdA/deno/swr.js:2:6259)
    at useCart (utils/data.ts:102:10)
    at Object.Cart (islands/Cart.tsx:47:27)

Similar issue on official deno merch, solution is changing the import_map.json line 13 to

"swr": "https://esm.sh/v98/swr@1.3.0?alias=react:preact/compat&external=preact/compat"

on a side note, if anyone want to change the port, add port to the main.ts start funcion. i.e

await start(manifest, { render,  port: 3000 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant