Search code examples
npmloggingnpm-install

How to see logs from npm installation?


I am unable to install ionic through npm. Are there any logs that I can check to see what's wrong and if yes, where are they located?

What I see is the waiting stick dancing forever. I've waited for an hour or so but nothing changes.


Solution

  • Append the --loglevel verbose argument to the command you want to run and all logs will be shown on STDERR and saved to npm-debug.log file in the current working directory.

    Example usage: npm install ionic --loglevel verbose.

    Running the npm commands like this, shows the logs in realtime and saves the logs to the directory its running within.


    For permanent solution, just edit the global npm configuration. To do this, run npm config edit command and add loglevel=verbose. Now every npm command will show detailed logs