-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
arkenvChanges to the `arkenv` npm package.Changes to the `arkenv` npm package.bugSomething isn't workingSomething isn't working
Description
Starting with arkenv 0.9.0, an error occurs during build when trying to use arkenv in a Next.js client bundle. It seems that arkenv imports node:module, which causes errors when building the client bundle.
By default, Next.js does not allow environment variables to be referenced from the client bundle, but you can reference them by adding the NEXT_PUBLIC_ prefix, so in my project I was using code similar to the following:
const parsedEnv = arkenv(ClientEnvSchema, {
env: {
NEXT_PUBLIC_SITE_URL: process.env.NEXT_PUBLIC_SITE_URL
}
});Is this a bug or intended behavior? If it is an intended behavior, are there any plans to make arkenv available in client bundles again? (Apologies if this was intended and was planned to be implemented in #655)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arkenvChanges to the `arkenv` npm package.Changes to the `arkenv` npm package.bugSomething isn't workingSomething isn't working