0

Good day!, I don't know if my question is correct. but what happens here is I created my own local development environment with the portable binaries. Please see:

enter image description here

Everything is working fine except for NPM. Everytime I install a global package in NPM I first need to create a batch file to call the .cmd from the node directory.

E.g. After installing Angular CLI, I need to create a batch file pointing to the ng.cmd file. Please see: (node directory)

enter image description here

And here is my ng.bat file in the cli folder: (cli directory) enter image description here enter image description here

The reason why I did this because I don't want to mess up my windows PATH environment settings. Here is my PATH variables where I already added my cli folder:

enter image description here

Is there a way of automating these? instead of creating manually a batch file in my cli folder every time I add a new package or binaries?

Best Regards

jreloz
  • 413
  • 4
  • 18
  • Assuming the listing is of `ng.bat`, you should be able to execute `ng whatever` from the prompt; `ng.bat` will run from `c:\web...cli\` and *that* should run `c:\web...node\ng.cmd` passing the parameters supplied to `ng.bat` Is that what you want to do? – Magoo Mar 09 '22 at 06:42
  • I'd assume that `ng.bat` contains only one line, i.e. `@call ..\node\ng.cmd %*`. Is that correct? and if not what is it? Also, what is the content of `ng.cmd`? – Compo Mar 09 '22 at 09:56
  • @Magoo yes you're correct. my problem is, everytime I install another package or add another binaries I need first to create a .bat file to use the command in my terminal. lets say, node-sass, i have to manually create a node-sass.bat file pointing to where the node-sass is installed – jreloz Mar 10 '22 at 00:12

0 Answers0