You could always use the github repository instead.
Is anyone else getting a 404 on the NDK NPM registry page? https://www.npmjs.com/package/@nostr-dev-kit/ndk
nostr:npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft
Discussion
I'd have to figure out how to set that up with npm. It should be able to search multiple registries, but I'm not sure if it can handle GitHub as a registry.
And npm isn't building from source like we'd do with CMake.