I\'m building an Angular 6 app, but every time I want to serve to localhost, I get these errors:
ERROR in ./node_modules/aws-sign2/index.js
Module not found
If the none of the above helped, I just lost 4 hours diagnosing why an Angular app that compiled yesterday now wouldn't compile due to "Module Not Found" errors.
The problem was that yesterday when I imported a class in one of my components, WebStorm pointed to an identically-named class in my backend node app like this:
import { ClassName } from '../../../../../../../../my-node-server-app/class-name';
It was then trying to compile all of the Node-specific modules that aren't compatible with an ES2015 browser app. If you're having the same problem and none of the above helps, check your imports! Hope I saved someone's sanity out there.