Skip to content

Process is not Defined - SvelteKit Import Error #102

Description

@solanacryptodev

So I'm using Shadow Drive (and Anchor JS) with SvelteKit and with both packages, I'm getting a process is not defined error I think because both packages use process, a server-side feature, that somehow gets triggered on import into a regular typescript file. I think this is because SvelteKit uses Vite. I saw in the Anchor issues section, one person solved the Anchor issue by using...

define: { 'process.env.ANCHOR_BROWSER': true },

...in the vite.config.js file. This works! I was wondering if anyone knows what process.env to pass in for ShadowDrive?

import error
import error 2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions