asdf-nodejs
asdf-nodejs copied to clipboard
bug: No matching version found for [email protected]
Describe the Bug
While working on a M1 and a legacy project I'm running into an error while trying to npm ci. I'm getting
No matching version found for [email protected].
Well that makes sense because there is no node-darwin-arm64 version 14.10.0.
package.lock doesn't include it. npm list node-darwin-arm64 shows:
npm list node-darwin-arm64
[email protected] /Users/sean.lawrenz/Documents/path
└── (empty)
So where is this coming from?
I try a different approach and open my terminal in rosetta.
arch
i386
node -v
v14.16.1
npm -v
6.14.12
node -p process.arch
x64
Still get the above error. There is a thread where nvm have fixed this issue. I'm hoping this is a wired issue with asdf.
Steps to Reproduce
On an M1 machine, try to run npm ci on a legacy project that using node 14.
Expected Behaviour
It shouldn't try to grab a version of node-darwin-arm64 that doesn't exist.
Actual Behaviour
It does try to grab a version of node-darwin-arm64 that doesn't exist.
Environment
OS:
Darwin localadp165smbp.lan 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64
SHELL:
zsh 5.8.1 (x86_64-apple-darwin21.0)
ASDF VERSION:
v0.10.2-7e7a1fa
ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/Users/sean.lawrenz/.asdf
ASDF INSTALLED PLUGINS:
nodejs https://github.com/asdf-vm/asdf-nodejs.git master f9957f3
ruby https://github.com/asdf-vm/asdf-ruby.git master c841ccd
asdf plugins affected (if relevant)
No response
@augustobmoura I transferred this issue from the asdf repository. Can you take a look? Thanks!
@Stratus3D I have a similar problem with a different node version 14.15.0. I don't see the bug in the asdf repo
I'm not sure what the fix would be in this case, nodejs doesn't provide Apple Silicon binaries for that version. The npm package looks like an unofficial build of those versions.
Because the error only shows up on npm ci, I'm leaning to think this is an issue with npm version resolution instead of asdf itself. I also don't have a M1/M2 machine to debug it, so any help on it would be appreciated
I'd be happy to test this on my M1, but I need detailed steps in order to test it.
On an M1 machine, try to run npm ci on a legacy project that using node 14.
I don't have a legacy project that uses node 14. I tried with some other node versions and the command succeeded.
@seanlawrenz can you provide more details?