Just recently, using the Run NPM step stopped working on my M1 Medium Bitrise pipeline. It gives me the following error:
Config: - Workdir: /Users/vagrant/git/app - Command: ci - NpmVersion: - UseCache: false Autodetecting npm version Checking package.json for npm version Could not read version information from package.json Locating system installed npm npm found at /Users/Vagrant/.asdf/shims/npm $ npm "--version" error getting installed npm version: error running npm command: No preset version installed for command npm Please install a version by running one of the following: asdf install nodejs 14 or add one of the following versions in your config file at /Users/vagrant/.tool-versions nodejs 12.22.9 nodejs 16.19.1 nodejs 19.8.1
which is weird, because I have a Script step earlier in the pipeline that using
npm explicitly like and it succeeds:
+ npm install -g appium@next --unsafe-perm=true --allow-root npm WARN deprecated email@example.com: Upgrade to typedoc >= 0.24 and remove typedoc-plugin-resolve-crossmodule-references from your dependencies added 423 packages, and audited 424 packages in 22s 48 packages are looking for funding run `npm fund` for details 7 moderate severity vulnerabilities To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. Reshimming asdf nodejs... + appium driver install uiautomator2 - Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver' ✔ Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver' ℹ Driver firstname.lastname@example.org successfully installed - automationName: UiAutomator2 - platformNames: ["Android"]
Where did the issue happen?
It’s running on BitRise
Xcode 14.1.x, on macOS 13.2 (Ventura) M1 Medium
Which build Step causes the issue and which version of the step?
Run NPM Command v1.1.6 (I also tried 1.1.4)
- Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
- Does a rebuild without caches help? (You can remove the
Cache:Pushsteps temporarily to not to use the cache, or you can delete all the caches on the
Settingstab of the app. : NO
- Does the issue happen sporadically, or every time? : Every time
- Does upgrading the build Step to the latest version help? : NO
- When did the issue start? : Today (June 22, 2023)
Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.
It’s not on Linux or Docker.