view all global dependencies npm code example Example: npm list global packages npm list -g --depth 0