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

Require is not defined #760

Open
skiwheelr opened this issue Jul 14, 2023 · 0 comments
Open

Require is not defined #760

skiwheelr opened this issue Jul 14, 2023 · 0 comments

Comments

@skiwheelr
Copy link

skiwheelr commented Jul 14, 2023

this is my code:

import "kubernetes-client"
const client = require('kubernetes-client').Client;

This is the error:

➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help
Kubernetes targetApiHost is https://138.197.92.32:6443
1:04:31 PM [vite] Error when evaluating SSR module /src/lib/database.ts:
|- ReferenceError: require is not defined
    at eval (/Users/skiwheelr/ui/src/lib/database.ts:18:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async instantiateModule (file:///Users/skiwheelr/ui/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:54405:9)
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