fix: use cross-env for Windows-compatible environment variable in npm script#4809
Open
algojogacor wants to merge 1 commit into
Open
fix: use cross-env for Windows-compatible environment variable in npm script#4809algojogacor wants to merge 1 commit into
algojogacor wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an independent contribution. I am not affiliated with the project maintainers.
Summary
Fix
npm startfailing on Windows due to Unix-only environment variable syntax in thestart:websitescript. The inlineNEXT_PUBLIC_LOCAL_QUILL=truesyntax is not recognized by Windows Command Prompt or PowerShell.Root Cause
In
package.json, thestart:websitescript uses Unix-style inline environment variable assignment:Windows shells (cmd.exe, PowerShell) do not support
VAR=value commandsyntax, causing error:'NEXT_PUBLIC_LOCAL_QUILL' is not recognized as an internal or external command.Fix
Replaced the inline environment variable with
cross-envto ensure cross-platform compatibility:Added
cross-envas a devDependency (^7.0.3).Testing
cross-envhas 7M+ weekly downloads and is the standard solution for cross-platform environment variables in npm scriptsCloses #3916