Running npm install for a library fails with error:
c++: error: unrecognized command line option '-stdlib=libc++'
For those who are still having this problem, the below command worked for me on fish shell and macOS.
env CC=clang CXX=clang++ npm install XXX
Running npm install
with the enviroment variable CXX=clang++
made it work:
CXX=clang++ npm install ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With