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

Invalid node version in .nvmrc: vXX #1975

Closed
IjzerenHein opened this issue Aug 3, 2023 · 6 comments
Closed

Invalid node version in .nvmrc: vXX #1975

IjzerenHein opened this issue Aug 3, 2023 · 6 comments
Assignees
Labels
bug Something isn't working eas build

Comments

@IjzerenHein
Copy link

Build/Submit details page URL

No response

Summary

As of [email protected], the following command has started failing in our environment:

eas build -p ios --profile test --non-interactive --no-wait

With the following error:

Invalid node version in .nvmrc: v16

Contents of our .nvmrc file:

v16

Managed or bare?

Managed

Environment

expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.4.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v16.20.0/bin/yarn
      npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
      Watchman: 2023.05.22.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    IDEs:
      Android Studio: 2022.2 AI-222.4459.24.2221.10121639
      Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
    npmPackages:
      expo: ^48.0.4 => 48.0.4
      react: 18.2.0 => 18.2.0
      react-dom: 18.2.0 => 18.2.0
      react-native: 0.71.3 => 0.71.3
      react-native-web: ~0.18.9 => 0.18.10

Error output

Invalid node version in .nvmrc: v16

Reproducible demo or steps to reproduce from a blank project

  • Add a .nvmrc file to your project with the following contents:
v16
  • Make sure eas.config does not contain a node version number

  • Run EAS build:

eas build -p ios
@IjzerenHein IjzerenHein added the needs review Issue is ready to be reviewed by a maintainer label Aug 3, 2023
@IjzerenHein
Copy link
Author

It seems like this is the offending line:

if (!semver.valid(nodeVersion)) {

semver is used to validate the version, however .nvmrc has a more liberal format and the value should probably be coerced using semver.coerce first.

@szdziedzic szdziedzic added bug Something isn't working eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Aug 3, 2023
@szdziedzic
Copy link
Member

Thank you very much for reporting this!

I will revert #1954 and publish a new version to make sure that no more builds are broken.

The semver.coerce will do the job, although I tested it and we need to make additional changes on our backend to support versions like just v16 to make sure that everything works properly, so for now, I will revert it.

We will re-add this functionality once everything works properly.

@szdziedzic
Copy link
Member

Just published version 3.18.2 which reverted this change

@IjzerenHein
Copy link
Author

Awesome, thanks for the quick response ❤️

For the record, I also tested with the value of 16 in our .nvmrc file but that resulted in the same error.

I just started a new eas build (after the revert) and it seems to be working again 👍 👍

@LeoAnt02
Copy link

LeoAnt02 commented Sep 1, 2023

@szdziedzic @khamilowicz
Issue seems to be back on our side

Since yesterday our pipeline now failing due to eas version 5.0.0

eas build -p android --profile staging --non-interactive
Error

Invalid node version in .nvmrc: lts/hydrogen
    Error: build command failed.

It's seems to be related to this .nvmrc change #1954

@szdziedzic
Copy link
Member

This PR should have fixed this issue ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working eas build
Projects
None yet
Development

No branches or pull requests

4 participants