Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack error: TypeError: Object prototype may only be an Object or null: undefined

I have an angular 4 application using webpack. When i try to run in in my amazon server i get this error. Works fine in my local. Any idea why this is happening? Thanks a lot for your help.

like image 721
sushmit sarmah Avatar asked Jun 26 '17 11:06

sushmit sarmah


1 Answers

This is a valid question and I don't see why some people would downvote it.

Anyway I fixed the problem. My package.json had @angular/compiler-cli in the dependencies. Removing that solved the problem. I have @angular/compiler-cli in the devDependencies. Problem was faced only on ec2 machine.

like image 153
sushmit sarmah Avatar answered Sep 28 '22 08:09

sushmit sarmah