I just downloaded node but npm is not working. whenever I use a npm comman I get Error: cannot find module \'strip-ansi\'.
I was stuck on this problem too. Finally, I solved the issue by adding value '.js', '.ts' to resolve.extensions in my webpack.config.js. If you are using webpack too, this may help.
'.js', '.ts'
resolve.extensions
webpack.config.js