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

Support Tanstack Start (tanstack.com) #24061

Open
birkskyum opened this issue May 31, 2024 · 10 comments
Open

Support Tanstack Start (tanstack.com) #24061

birkskyum opened this issue May 31, 2024 · 10 comments
Labels
bug Something isn't working correctly node compat

Comments

@birkskyum
Copy link
Contributor

birkskyum commented May 31, 2024

Version: Deno 1.44.0

Repro:

Clone https://github.com/tanstack/tanstack.com
pnpm i (using pnpm v 8.10.2)
DENO_FUTURE=1 deno task dev

Error:

➜ DENO_FUTURE=1 deno task dev
Task dev vinxi dev
vinxi v0.3.11
vinxi starting dev server

 ERROR  Cannot read properties of undefined (reading 'env')                                                                                                                                      2:23:41 PM

  at Object.plugins (app.config.timestamp_1717158220687.js:14:32)
  at Object.plugins (node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs:3193:40)
  at Object.plugins (node_modules/.pnpm/@tanstack+start@1.34.2_@opentelemetry+api@1.8.0_react-dom@18.3.1_react@18.3.1_typescript@5.3.3_vite@5.1.4/node_modules/@tanstack/start/dist/esm/config/index.js:152:59)
  at Object.plugins (node_modules/.pnpm/@tanstack+start@1.34.2_@opentelemetry+api@1.8.0_react-dom@18.3.1_react@18.3.1_typescript@5.3.3_vite@5.1.4/node_modules/@tanstack/start/dist/esm/config/index.js:211:45)
  at createViteHandler (node_modules/.pnpm/vinxi@0.3.11_@opentelemetry+api@1.8.0/node_modules/vinxi/lib/dev-server.js:58:31)
  at async Object.handler (node_modules/.pnpm/vinxi@0.3.11_@opentelemetry+api@1.8.0/node_modules/vinxi/lib/router-modes.js:147:27)
  at async Promise.all (index 1)
  at async createDevServer (node_modules/.pnpm/vinxi@0.3.11_@opentelemetry+api@1.8.0/node_modules/vinxi/lib/dev-server.js:155:5)
  at async Object.run (node_modules/.pnpm/vinxi@0.3.11_@opentelemetry+api@1.8.0/node_modules/vinxi/bin/cli.mjs:182:17)
  at async runCommand (node_modules/.pnpm/citty@0.1.6/node_modules/citty/dist/index.mjs:316:16) 



 ERROR  Cannot read properties of undefined (reading 'env')    

Seems like it's breaking at:

authToken: process.env.SENTRY_AUTH_TOKEN,

But it works fine with pnpm run dev

@reeceorbuck
Copy link

I think I have a similar error- broke between 1.43.5 -> 1.43.6 and still failing in 1.44.0
importing from "npm:@azure/identity" will fail as cannot read properties of undefined (process.versions).

The debugger shows the process class is completely missing several properties: versions, env (your error), and several others.

@marvinhagemeister marvinhagemeister added bug Something isn't working correctly node compat labels Jun 1, 2024
@tesharp
Copy link

tesharp commented Jun 11, 2024

Same problem. Have to revert to 1.43.5 for azure/identity to work.

@bartlomieju
Copy link
Member

@reeceorbuck @tesharp could you please share some reproduction code that causes the failure you're describing?

@reeceorbuck
Copy link

import { ClientSecretCredential } from "npm:@azure/identity";
const test = new ClientSecretCredential("a","b","c",);

A script with these two lines will throw.

@reeceorbuck
Copy link

@reeceorbuck @tesharp could you please share some reproduction code that causes the failure you're describing?

Just responded with short piece of code that shows my issue. Sorry I'm totally unfamiliar with GitHub conventions

@bartlomieju
Copy link
Member

Thanks, I can now reproduce the problem.

@birkskyum
Copy link
Contributor Author

The error now is (deno 1.45.5+6522478):

 ERROR  process is not defined                                                                            

instead of the

 ERROR  Cannot read properties of undefined (reading 'env')

@birkskyum
Copy link
Contributor Author

@birkskyum
Copy link
Contributor Author

I'll focus on triaging this for Deno 2, which prompts this install error instead:

@birkskyum birkskyum closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2024
@birkskyum birkskyum changed the title Cannot read properties of undefined (reading 'env') Cannot read properties of undefined (reading 'env') (tanstack.com) Sep 15, 2024
@birkskyum birkskyum changed the title Cannot read properties of undefined (reading 'env') (tanstack.com) tanstack.com - Cannot read properties of undefined (reading 'env') Sep 15, 2024
@birkskyum birkskyum changed the title tanstack.com - Cannot read properties of undefined (reading 'env') Error running tanstack.com Sep 15, 2024
@birkskyum birkskyum reopened this Sep 15, 2024
@birkskyum birkskyum changed the title Error running tanstack.com Support Tanstack Start Sep 15, 2024
@birkskyum birkskyum changed the title Support Tanstack Start Support Tanstack Start (tanstack.com) Sep 15, 2024
@birkskyum
Copy link
Contributor Author

birkskyum commented Sep 24, 2024

deno task dev show this on localhost:

Screenshot 2024-09-24 at 11 38 55

server terminal show

Task dev vinxi dev
vinxi v0.3.14
vinxi starting dev server
[sentry-vite-plugin] Warning: No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
[sentry-vite-plugin] Warning: No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/

♻️  Generating routes...
✅ Processed routes in 93ms
[sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.

  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

ServerFn Request: /Users/admin/repos/deno-kitchensink/tanstack.com/app/server/sponsors.ts - $$function0

Missing github credentials, returning mock data.
Missing airtable credentials, returning mock data.
Missing airtable credentials, returning mock data.
Missing airtable credentials, returning mock data.
Missing github credentials, returning mock data.
ServerFn Response: 200
 - Payload: []

This output is alright, but had it been run with another runtime, the output would have continued with this and actually loaded the website:


1:41:24 AM [vite] ✨ new dependencies optimized: react-icons/md, tailwind-merge, @orama/react-components, react-icons/fa, @tanstack/start/client-runtime, react-icons/im, airtable, axios, @octokit/rest, @octokit/graphql
1:41:24 AM [vite] ✨ optimized dependencies changed. reloading
ServerFn Request: /Users/admin/repos/deno-kitchensink/tanstack.com/app/server/sponsors.ts - $$function0

ServerFn Response: 200
 - Payload: []

1:41:25 AM [vite] ✨ new dependencies optimized: @visx/hierarchy, @visx/responsive
1:41:25 AM [vite] ✨ optimized dependencies changed. reloading
ServerFn Request: /Users/admin/repos/deno-kitchensink/tanstack.com/app/server/sponsors.ts - $$function0

ServerFn Response: 200
 - Payload: []

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

5 participants