fix: use cross-env for cross-platform PORT default

Replace POSIX-only PORT=${PORT:-8502} syntax with cross-env
to ensure npm run start works on Windows and other platforms.

- Install cross-env as dev dependency
- Update start script to use cross-env PORT=8502
This commit is contained in:
LUIS NOVO 2026-01-14 22:37:02 -03:00
parent cd55592b39
commit 948ab04896
2 changed files with 28 additions and 1 deletions

View file

@ -54,6 +54,7 @@
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"cross-env": "^10.1.0",
"eslint": "^9",
"eslint-config-next": "15.4.2",
"tailwindcss": "^4",
@ -125,6 +126,13 @@
"tslib": "^2.4.0"
}
},
"node_modules/@epic-web/invariant": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz",
"integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==",
"dev": true,
"license": "MIT"
},
"node_modules/@eslint-community/eslint-utils": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
@ -4038,6 +4046,24 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true
},
"node_modules/cross-env": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz",
"integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@epic-web/invariant": "^1.0.0",
"cross-spawn": "^7.0.6"
},
"bin": {
"cross-env": "dist/bin/cross-env.js",
"cross-env-shell": "dist/bin/cross-env-shell.js"
},
"engines": {
"node": ">=20"
}
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",

View file

@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "PORT=${PORT:-8502} node .next/standalone/server.js",
"start": "cross-env PORT=8502 node .next/standalone/server.js",
"lint": "next lint"
},
"dependencies": {
@ -55,6 +55,7 @@
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"cross-env": "^10.1.0",
"eslint": "^9",
"eslint-config-next": "15.4.2",
"tailwindcss": "^4",