Skip to content

fix: add cross-env to support Windows dev script#970

Open
shun0619 wants to merge 1 commit into
rahuldkjain:mainfrom
shun0619:fix/windows-dev-script
Open

fix: add cross-env to support Windows dev script#970
shun0619 wants to merge 1 commit into
rahuldkjain:mainfrom
shun0619:fix/windows-dev-script

Conversation

@shun0619
Copy link
Copy Markdown

🔄 Pull Request

📋 Type of Change (check all applicable)

  • 🐛 Bug Fix - Fixes an issue without breaking existing functionality
  • Feature - Adds new functionality
  • Performance - Improves performance without changing functionality
  • ♻️ Refactor - Code changes that neither fix bugs nor add features
  • 📚 Documentation - Updates to documentation, comments, or README
  • 🎨 Style - Code style changes (formatting, missing semi-colons, etc.)
  • 🧪 Test - Adding or updating tests
  • 🏗️ Build - Changes to build system or dependencies
  • 👷 CI/CD - Changes to CI/CD workflows
  • 🔒 Security - Security improvements or vulnerability fixes
  • Accessibility - Improves accessibility compliance
  • 📱 Mobile - Mobile-specific improvements
  • 🌐 i18n - Internationalization changes

📖 Description

What changed?

This PR fixes an issue where npm run dev fails on Windows because the environment variable syntax:
TURBOPACK=1 next dev --turbo

is not recognized by CMD or PowerShell.

To make the development script work across all platforms (Windows, macOS, Linux), I added cross-env and updated the dev script to:
"dev": "cross-env TURBOPACK=1 next dev --turbo"

I also added cross-env to devDependencies so it installs automatically when users run npm install.

Why was this change made?

Windows contributors cannot start the development server due to the environment variable syntax error.
This creates a barrier for new contributors and prevents Windows users from running the project locally.

How does this change help users?

  • Ensures npm run dev works consistently on all operating systems
  • Improves onboarding for Windows contributors
  • Removes a platform‑specific error that blocks development

🔗 Related Issues

  • Closes #
  • Fixes #
  • Related to #

🧪 Testing & Quality Assurance

Testing Done (check all applicable)

  • Manual testing - Tested functionality manually
  • 🧪 Unit tests - Added/updated unit tests
  • 🔄 Integration tests - Tested with other components
  • 📱 Mobile testing - Tested on mobile devices
  • Accessibility testing - Tested with screen readers/keyboard nav
  • 🌐 Cross-browser testing - Tested in multiple browsers
  • 🎨 Visual testing - Checked UI/UX in light/dark themes

Test Instructions

  1. Run npm install
  2. Run npm run dev
  3. The development server should start without errors on all platforms

Expected Behavior

npm run dev should work on Windows, macOS, and Linux without environment variable errors.

📸 Screenshots/Recordings

No UI changes.

Before

After

📋 Checklist

Code Quality

  • 🔍 TypeScript - No TypeScript errors (npm run type-check)
  • 🧹 Linting - No ESLint errors (npm run lint)
  • 🎨 Formatting - Code is properly formatted (npm run format)
  • 🏗️ Build - Production build succeeds (npm run build)
  • Performance - No performance regressions introduced

Accessibility

  • WCAG Compliance - Follows WCAG 2.1 AA guidelines
  • ⌨️ Keyboard Navigation - All interactive elements are keyboard accessible
  • 🔍 Screen Reader - Proper ARIA labels and semantic HTML
  • 🎨 Color Contrast - Meets contrast requirements
  • 🎯 Focus Management - Visible focus indicators

Mobile & Responsive

  • 📱 Mobile Responsive - Works on mobile devices (320px+)
  • 🖥️ Desktop - Works on desktop (1024px+)
  • 📐 Tablet - Works on tablet sizes (768px+)
  • 🔄 Orientation - Works in portrait and landscape

Browser Compatibility

  • 🌐 Chrome - Latest version
  • 🦊 Firefox - Latest version
  • 🧭 Safari - Latest version
  • 📱 Mobile Safari - iOS Safari
  • 📱 Chrome Mobile - Android Chrome

Documentation

  • 📚 Code Comments - Added helpful comments for complex logic
  • 📖 Documentation - Updated relevant documentation
  • 📝 README - Updated README if needed
  • 🔄 Changelog - Will be auto-generated from conventional commits

Security & Privacy

  • 🔒 No Secrets - No API keys, passwords, or sensitive data exposed
  • 🛡️ Input Validation - Proper validation for user inputs
  • 🔐 XSS Prevention - Protected against XSS attacks
  • 🍪 Privacy Compliant - Follows GDPR/privacy requirements

🚀 Deployment Notes

  • No breaking changes - Backward compatible
  • Database changes - N/A (static site)
  • Environment variables - No new env vars needed
  • Third-party dependencies - No new external dependencies

📝 Additional Notes

This is a minimal, safe fix that improves cross‑platform compatibility and helps Windows contributors run the project without errors

👀 Reviewers


By submitting this PR, I confirm that:

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

Successfully merging this pull request may close these issues.

1 participant