-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
arkenvChanges to the `arkenv` npm package.Changes to the `arkenv` npm package.bugSomething isn't workingSomething isn't working
Description
When importing arkenv in browser environments (Vite, Bun frontend), the library fails with a module externalization error:
Error: Module "node:util" has been externalized for browser compatibility.
Cannot access "node:util.styleText" in client code.
Reproduction:
- Import
createEnvfromarkenvin a Vite/Bun React component - Run the dev server
- Error appears in browser console
Root Cause:
packages/arkenv/src/errors.ts imports styleText from node:util, which is Node-only.
Expected:
arkenv should work in both Node and browser environments without Node-specific dependencies.
Solution:
Replace node:util.styleText with a cross-platform alternative that works in browsers while maintaining zero dependencies.
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