Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
978 views
in Technique[技术] by (71.8m points)

npm - Powershell files created outside of node_modules

Up until yesterday, whenever I installed a package (e.g. nodemon), they would be added to the node_modules dir. This morning, when I installed a bigger project, the powershell and cmd files were saved outside of that directory, in addition to a file without an extension. It looked like this: dependencies

Why is example, example.cmd and example.ps1 saved outside of node_modules?

question from:https://stackoverflow.com/questions/65938057/powershell-files-created-outside-of-node-modules

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

1 Answer

0 votes
by (71.8m points)

I would like to answer my own question. I had accidentally messed around with the npm prefix. If this happens to you, go to the cmd prompt and type npm set prefix C:/bin and you should be alright :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...