Build process for Node.js detecting wrong version
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When having two Node.js projects (one for a back-end, and one for a front-end), Oryx uses the wrong version of Node.js. The project expects to be built with `>=20.18.1` (as is listed in the Engine fields), but is using `18.20.8`, while Oryx's default is `16`.
**To Reproduce**
Steps to reproduce the behavior:
1. Using the repro below, push to GitHub.
2. Run the action with the appropriate project on Static Web Apps
3. The build fails due to expecting a higher version than given.
a. Note: Both `./package.json` and `./packages/serverless/package.json` list an `engines.node` field but the build fails due to the latter being higher than `18.20.8` (as seen in the action log).
**Relevant Files**
- Action log: [1_Build and Deploy Job.txt](https://github.com/user-attachments/files/21560937/1_Build.and.Deploy.Job.txt)
- The problem line is at 430.
- Basic repro: [oryx-bug-repro.zip](https://github.com/user-attachments/files/21561045/oryx-bug-repro.zip)
- This contains the same file structure and dependencies without the code. If you'd like more details, or the structure of the repo is incorrect, let me know.
**Expected behavior**
Oryx should properly detect the node version requested and the build should succeed.
**Screenshots**
N/A, view log file and reproduction.
**Device info (if applicable):**
- OS: Windows 11 Enterprise 24H2
- Browser: Firefox 141.0
**Additional context**
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.