Nuxt 3.7.0 with Nitro 2.6.2 build server cause port problem when deploy on azure app service
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Description
Environment
- Operating System: Windows_NT
- Node Version: v18.17.1
- Nuxt Version: 3.7.0
- CLI Version: 3.7.2
- Nitro Version: 2.6.2
- Package Manager: yarn@1.22.5
Reproduction
using a Nuxt 3.7.0 with Nitro 2.6.2 project
yarn run build and deploy to a azure app service
Describe the bug
RangeError [ERR_SOCKET_BAD_PORT]: options.port should be >= 0 and < 65536. Received \.\pipe\a52b3a22-a8b8-516c-b23f-b824dbfe0c8f.at new NodeError (node:internal/errors:393:5)at validatePort (node:internal/validators:372:11)at Server.listen (node:net:1613:5)at file:///C:/home/site/wwwroot/.output/server/chunks/nitro/node-server.mjs:5617:25at ModuleJob.run (node:internal/modules/esm/module_job:193:25)at async Promise.all (index 0)at async ESMLoader.import (node:internal/modules/esm/loader:530:24)at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
Additional context
currently edit .output/server/server/chunks/nitro/node-server.mjs
const listener = server.listen(path ? { path } : { port, host }, (err) => {
to
const listener = server.listen(port, host, (err) => {
can fix the problem
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by building the Nuxt 3.7.0 project and deploying it to Azure App Service. Start with .output/server/server/chunks/nitro/node-server.mjs and inspect the server.listen call around the reported failure. Done means the deployed server starts without ERR_SOCKET_BAD_PORT.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, node.js, nuxt
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100