ApsarasX/llvm-bindings

[Bug] "npm config set cmake_LLVM_DIR ..." no longer allowed by npm

rishavs opened this issue · 0 comments

Your environment

  • OS version: Windows 11
  • Node.js version: 20.2.0
  • LLVM version: 16.0.0

Describe the bug
NPM no longer allows users to set custom configs. As such, installing this library is no longer possible.
More discussion here npm/cli#5852
Using this command throws error;

PS C:\Users\risharan\Documents\GitHub\tails> npm config set cmake_LLVM_DIR "C:\Users\risharan\scoop\apps\llvm\current\lib\cmake\llvm"
npm ERR! `cmake_LLVM_DIR` is not a valid npm option

npm ERR! A complete log of this run can be found in: C:\Users\risharan\scoop\persist\nodejs\cache\_logs\2023-07-04T12_23_04_114Z-debug-0.log

Expected behavior

Expected to set the npm config to install the bindings. However this is no longer possible.
Instead will recommend;

  1. Adding a config in package.json for the path
  2. using os path variable for this
  3. passing path as argument to npm install