I can't run my angular app on amazon ec2. When I execute ng serve or ng serve -c stage with environment.stage.ts configuration, i'm getting errors as shown on the screenshot below. The error does not appear when run locally on my pc and project is compiled without errors.
The version of rxjs is 5.5.5.
Angular, angular-cli and node version also below.
ERROR in ./node_modules/@angular/router/esm5/router.js Module not found: Error: Can't resolve 'rxjs/BehaviorSubject' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@angular/router/esm5' ERROR in ./node_modules/@agm/core/services/google-maps-api-wrapper.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services' ERROR in ./node_modules/@agm/core/services/managers/data-layer-manager.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services/managers' ERROR in ./node_modules/@agm/core/services/managers/marker-manager.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services/managers' ERROR in ./node_modules/@agm/core/services/managers/info-window-manager.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services/managers' ERROR in ./node_modules/@agm/core/services/managers/polyline-manager.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services/managers' ERROR in ./node_modules/@agm/core/services/managers/circle-manager.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services/managers' ERROR in ./node_modules/@agm/core/services/managers/kml-layer-manager.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services/managers' ERROR in ./node_modules/@agm/core/services/managers/polygon-manager.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@agm/core/services/managers' ERROR in ./node_modules/@angular/core/esm5/core.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@angular/core/esm5' ERROR in ./node_modules/@angular/http/esm5/http.js Module not found: Error: Can't resolve 'rxjs/Observable' in '/home/ubuntu/b2s_dev/b2s_v2_web/node_modules/@angular/http/esm5' ℹ 「wdm」: Failed to compile.
BR,
