nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
105.26k stars 28.51k forks source link

18.16.1 Directory Access Issue in Docker Alpine with Nest ViewEngine #48743

Open MarcusTheSmith opened 12 months ago

MarcusTheSmith commented 12 months ago

Version

18.16.1

Platform

Alpine Linux Docker Image

Subsystem

No response

What steps will reproduce the bug?

Update Docker Image from 18.16.0-Alpine to 18.16.1-Alpine Using the ViewEngine referencing template docs, Nest.JS will return a 500 when trying to load saying:

Failed to lookup view "welcome" in views directory "/app/dist/view-engine/views"
    at Function.render (/app/node_modules/express/lib/application.js:597:17)
    at ServerResponse.render (/app/node_modules/express/lib/response.js:1039:7)
    at ExpressAdapter.render (/app/node_modules/@nestjs/platform-express/adapters/express-adapter.js:60:25)
    at RouterResponseController.render (/app/node_modules/@nestjs/core/router/router-response-controller.js:29:36)
    at async /app/node_modules/@nestjs/core/router/router-execution-context.js:158:24
    at async /app/node_modules/@nestjs/core/router/router-execution-context.js:47:13
    at async /app/node_modules/@nestjs/core/router/router-proxy.js:9:17

How often does it reproduce? Is there a required condition?

So long as the Alpine image is running 18.16.1

What is the expected behavior? Why is that the expected behavior?

Node 18.16.1 should act just like Node 18.16.0

What do you see instead?

The directory lookup failing for 18.16.1 and succeeding for previous versions.

Additional information

This may be an Express/Nest issue, however because it started failing on a minor version update of Node (which should not require dependency updating) I would consider it a bug with Node. I'm happy to report to Nest.JS if initial investigation proves the issue to not be with Node.

mscdex commented 12 months ago

There were no filesystem-related changes in node v18.16.1. You can see the changelog for that version here. It was a security release.

MarcusTheSmith commented 12 months ago

There were no filesystem-related changes in node v18.16.1. You can see the changelog for that version here. It was a security release.

Understood. But when nothing else changes besides switching Node versions, it gets file system errors. It may be that the security fixes are having unexpected side effects. If I can provide more specific information or a shared example let me know what would be helpful.

mscdex commented 12 months ago

Have you tried outside of Docker with pre-built v18.16.0 and v18.16.1 binaries from nodejs.org to rule some things out?