I ran npm install
on a project and it gives a number of errors and warnings that I want to catch, but the output is too long and being cut off so I can't view the full list in the terminal.
I tried redirect it to a file but the output is still being written to the terminal and I still get an output file which only list the dependency trees.
I also tried to pipe it to less in linux but it still run through many screens until stopped for continue.
I checked npm doc and it doesn't seem to have log functionality, what I want is to be able to log the exact output in a file, how can I do it?