Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nixpacks Node.js Build Fails with .nvmrc File Containing Non-Numeric Version (e.g., lts/iron) #1190

Open
1 task done
aliesenli opened this issue Sep 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@aliesenli
Copy link

aliesenli commented Sep 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When attempting to build a Node.js project with Nixpacks, the build fails if there is an .nvmrc file that contains a version string like lts/iron. It seems that the code only recognizes versions in the format (e.g., 20.13.1), but nvmrc files may contain other valid formats such as lts/iron.

Current behaviour:
The build fails because the version string in the .nvmrc file is not recognized if its a string (lts/iron) and throws following error:

Syntax error: unexpected token "T_BASIC_UNESCAPED" at line 1 with value ": node version lts/iron is not valid

To reproduce

  1. Add an .nvmrc file with the content specifying a version as string like lts/iron.
  2. Try to build with Nixpacks.

Environment

Nixpacks: v1.28.1

@aliesenli aliesenli added the bug Something isn't working label Sep 13, 2024
@aliesenli aliesenli changed the title Nixpacks Bug Report Nixpacks Node.js Build Fails with .npmrc File Containing Non-Numeric Version Strings (e.g., lts/iron) Sep 13, 2024
@aliesenli aliesenli changed the title Nixpacks Node.js Build Fails with .npmrc File Containing Non-Numeric Version Strings (e.g., lts/iron) Nixpacks Node.js Build Fails with .nvmrc File Containing Non-Numeric Version Strings (e.g., lts/iron) Sep 13, 2024
@aliesenli aliesenli changed the title Nixpacks Node.js Build Fails with .nvmrc File Containing Non-Numeric Version Strings (e.g., lts/iron) Nixpacks Node.js Build Fails with .nvmrc File Containing Non-Numeric Version (e.g., lts/iron) Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant