I
I
ince2019-01-18 17:22:04
Node.js
ince, 2019-01-18 17:22:04

How to get the list of installed modules on node.js?

I want to know the list of installed modules on node.js, I ask npm list -g --depth=0
Returns this:

C:\Users\username\AppData\Roaming\npm
+--  error: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\History.md\package.json
+--  error: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\index.js\package.json
+--  error: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\lib\package.json
+--  error: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\LICENSE\package.json
+--  error: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\package.json\package.json
`--  error: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\Readme.md\package.json

npm ERR! error in C:\Users\username\AppData\Roaming\npm\node_modules\History.md: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\History.md\package.json'
npm ERR! error in C:\Users\username\AppData\Roaming\npm\node_modules\LICENSE: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\LICENSE\package.json'
npm ERR! error in C:\Users\username\AppData\Roaming\npm\node_modules\Readme.md: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\Readme.md\package.json'
npm ERR! error in C:\Users\username\AppData\Roaming\npm\node_modules\index.js: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\index.js\package.json'
npm ERR! error in C:\Users\username\AppData\Roaming\npm\node_modules\lib: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\lib\package.json'
npm ERR! error in C:\Users\username\AppData\Roaming\npm\node_modules\package.json: ENOENT: no such file or directory, open 'C:\Users\username\AppData\Roaming\npm\node_modules\package.json\package.json'

What is the problem, what am I doing wrong? (if that machine is not connected to the internet)
Node.js is located at c:/node/
On another computer connected to the network, everything works fine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-01-18
@ince

The problem is not with the internet. I checked npm listand everything works with and without internet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question