⏲️ Timestamps ⏲️ 00:00 - Intro 00:35 - What is NPM? 03:06 - What is NPX? 03:50 - Run a locally installed package easily 04:30 - Execute packages without installing them 05:16 - Run code directly from GitHub 06:09 - Test different package versions 08:15 - Final words
@VinceAggrippino3 жыл бұрын
4:52 "npx just ran a script without installing it on my machine", but the screen says "installed 41 in 2.67s". On my system, the same command says prompts me to install the package. Then I can see it installed in ~/.npm/_npx. I think there's a misunderstanding here. It must be a common one, because this is the second place I've seen that claim. Update: Confirmed by the documentation: www.npmjs.com/package/npx npx will install the package on your system if it's not already installed.
@NeutronDev3 жыл бұрын
Thanks for pointing that out! I've been doing some digging and I tried invoking several packages and gists that weren't previously installed on my machine and here's what I've found: While invoking a package/gist, npx creates a temporary folder in C:\Users\\AppData\Roaming pm-cache\_npx (Windows 10) and it deletes it after the execution. So basically it does install the package on your local machine but only while executing the package and then it proceeds to delete it. My wording in the video isn't very correct in this context, indeed. If you have more information about this matter, please do let me know!
@pedrocxbx2 жыл бұрын
@@NeutronDev Thanks for the explanation, I had the same doubt