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

SolidStart - with-authjs example breaks #23474

Closed
birkskyum opened this issue Apr 20, 2024 · 1 comment
Closed

SolidStart - with-authjs example breaks #23474

birkskyum opened this issue Apr 20, 2024 · 1 comment
Labels
bug Something isn't working correctly node compat

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Apr 20, 2024

deno 1.42.4+04c6785

Repro:

  • deno run -A npm:create-solid
  • select SolidStart, TypeScript, with-authjs
  • npm i
  • rename .env.example -> .env, and add some random string for the DISCORD_CLIENT_ID/SECRET
  • DENO_FUTURE=1 deno task dev

Error on the server - doesn't load the .env:

DENO_FUTURE=1 deno task dev                                                               
Task dev vinxi dev
vinxi v0.3.11
vinxi starting dev serverLocal:    http://localhost:3000/Network:  use --host to expose

10:25:50PM [vite] Error when evaluating SSR module /src/server/auth.ts:
|- TypeError: Cannot read properties of undefined (reading 'env')
    at eval (/Users/admin/repos/deno-kitchensink/authjs/src/server/auth.ts, <anonymous>:7:23)
    at async instantiateModule (file:///Users/admin/repos/deno-kitchensink/authjs/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)

10:25:50PM [vite] Error when evaluating SSR module /src/routes/api/auth/[...solidauth].ts?pick=GET: failed to import "/src/server/auth.ts"
|- TypeError: Cannot read properties of undefined (reading 'env')
    at eval (/Users/admin/repos/deno-kitchensink/authjs/src/server/auth.ts, <anonymous>:7:23)
    at async instantiateModule (file:///Users/admin/repos/deno-kitchensink/authjs/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)

[h3] [unhandled] TypeError: Cannot read properties of undefined (reading 'env')
    at eval (/Users/admin/repos/deno-kitchensink/authjs/src/server/auth.ts, <anonymous>:7:23)
    at async instantiateModule (file:///Users/admin/repos/deno-kitchensink/authjs/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)
Caused by TypeError: Cannot read properties of undefined (reading 'env')
    at eval (/Users/admin/repos/deno-kitchensink/authjs/src/server/auth.ts, <anonymous>:7:23)
    at async instantiateModule (file:///Users/admin/repos/deno-kitchensink/authjs/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9) {
  cause: TypeError: Cannot read properties of undefined (reading 'env')
    at eval (/Users/admin/repos/deno-kitchensink/authjs/src/server/auth.ts, <anonymous>:7:23)
    at async instantiateModule (file:///Users/admin/repos/deno-kitchensink/authjs/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9),
  statusCode: 500,
  fatal: false,
  unhandled: true,
  statusMessage: undefined,
  data: undefined

Expected:
Similar to when running with node, I expected to see this (ofc. the login button won't work with wrong keys):
Screenshot 2024-04-20 at 22 15 00

Blocked by:

@birkskyum birkskyum changed the title SolidStart - can't run with-authjs example SolidStart - with-authjs example breaks Apr 20, 2024
@lucacasonato lucacasonato added bug Something isn't working correctly node compat labels Jun 8, 2024
@birkskyum
Copy link
Contributor Author

It seems like this is working now
deno 1.45.5+6522478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

No branches or pull requests

2 participants