+ 3

Does `npm install -g` save a package for offline use?

Let's say that I've installed Vue using npm install -g vue Will it be available offline? And how would I install it when offline? Thanks!!!

22nd Oct 2018, 8:50 AM
Edwin Pratt
Edwin Pratt - avatar
4 odpowiedzi
+ 5
It will save the package globally so you can 'use it' when offline/online. To the question if you can install while offline, No.
22nd Oct 2018, 9:39 AM
Lord Krishna
Lord Krishna - avatar
+ 3
Thanks Lord Krishna!!!
22nd Oct 2018, 9:59 AM
Edwin Pratt
Edwin Pratt - avatar
+ 2
Um Lord Krishna... If I have installed a package globally, how can I add it to my project when I'm offline?
25th Oct 2018, 2:19 PM
Edwin Pratt
Edwin Pratt - avatar
+ 2
The procedure is the same for online/offline. # see the guides below for info https://www.sitepoint.com/beginners-guide-node-package-manager/ https://flaviocopes.com/npm/
25th Oct 2018, 2:48 PM
Lord Krishna
Lord Krishna - avatar