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

NVM step fails to install required version of node because of nvm self update fail #14

Open
mrister opened this issue Jul 5, 2022 · 5 comments

Comments

@mrister
Copy link

mrister commented Jul 5, 2022

This seems to happen occasionally.

image

However the problem is that this step in essence fails but for Bitrise (As seen on image) it did not fail. This causes other steps in workflow to think it succeeded until one of them blows up because of incompatible node version because the nvm did not install it

@Almouro
Copy link
Owner

Almouro commented Jul 19, 2022

Hi @mrister, thanks for posting this!

Indeed the script is lacking a set -e, I'll fix that soon

In the build you posted though, it seems that nvm is already installed before running the step, and it's not able to update it. Do you know if nvm was installed previously?

@mrister
Copy link
Author

mrister commented Jul 19, 2022

Hi @mrister, thanks for posting this!

Indeed the script is lacking a set -e, I'll fix that soon

In the build you posted though, it seems that nvm is already installed before running the step, and it's not able to update it. Do you know if nvm was installed previously?

Quite possibly it is (was) as we cache a lot of things via Btirse cache steps.

@Almouro
Copy link
Owner

Almouro commented Jul 19, 2022

All right

In any case, it should fail with #15 in version 1.3.1
it should be available some time after bitrise-io/bitrise-steplib#3551 is merged

@leethree
Copy link

it seems like after this change our builds fail for no apparent reason:

+------------------------------------------------------------------------------+

| (3) nvm@1                                                                    |
+------------------------------------------------------------------------------+
| id: nvm                                                                      |
| version: 1.3.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2022-07-20T09:43:05Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15037  100 15037    0     0   594k      0 --:--:-- --:--:-- --:--:--  863k
=> Downloading nvm from git to '/Users/vagrant/.nvm'

=> Cloning into '/Users/vagrant/.nvm'...
* (HEAD detached at FETCH_HEAD)
  master
=> Compressing and cleaning up git repository
=> Appending nvm source string to /Users/vagrant/.profile
=> bash_completion source string already in /Users/vagrant/.profile
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:
/usr/local/lib
├── @ionic/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:
     $ nvm use system
     $ npm uninstall -g a_module
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | nvm@1 (exit code: 3)                                          | 6.50 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/almouro/bitrise-nvm-step/issues            |
| Source: https://github.com/almouro/bitrise-nvm-step                          |
+---+---------------------------------------------------------------+----------+

I don't see an error message but the step failed. Do you know what's the issue here?

@mrister
Copy link
Author

mrister commented Jul 20, 2022

@leethree @Almouro might be related to recent release, I have described it in this issue #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants