nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Nuxt 3.7.0 with Nitro 2.6.2 build server cause port problem when deploy on azure app service

Open annndddy opened this issue 1 year ago • 15 comments

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: [email protected]

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

annndddy avatar Aug 28 '23 08:08 annndddy