Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I believe that in the past I've discovered an option to pass to npm to get it to output the path it is using for -g (global modules). Does anyone know such an option? Or any other method to get the global path prefix npm is using?

I know where where the global modules live on my computer (/usr/local/share/npm/bin), and generally it only takes a few minutes to find global modules on other computers: usually $PATH is correctly configured, and if not, well, poking around does the trick. But isn't there be some quick way to tell how npm was built, and which path it's using for globals modules?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
598 views
Welcome To Ask or Share your Answers For Others

1 Answer

npm config get prefix will return the path.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...