JavaScript heap out of memory in angular js gulp sourcemap ngannonate with babel

前端 未结 3 621
北荒
北荒 2021-01-28 02:51

I am using es6 syntax in my angular JS project but it throws error when run gulp build, search over github and So but some saying this is error due to gulp uglify w

3条回答
  •  借酒劲吻你
    2021-01-28 03:38

    I after struggling for a while i managed to fixed this issue by replacing all ^ by ~ from the all the dependencies in package.json file.

    Replace

      "dependencies": {
         "@agm/core": "^1.0.0-beta.5",
        "@angular/animations": "^7.2.0",
        "@angular/common": "^7.2.0",
        "@angular/compiler": "^7.2.0",
        "@angular/core": "^7.2.0",
        "@angular/forms": "^7.2.0",
        ...
    
      },
    

    To

      "dependencies": {
         "@agm/core": "~1.0.0-beta.5",
        "@angular/animations": "~7.2.0",
        "@angular/common": "~7.2.0",
        "@angular/compiler": "~7.2.0",
        "@angular/core": "~7.2.0",
        "@angular/forms": "~7.2.0",
        ...
    
      },
    

    I think this issue is because of conflict between different version of libraries.

提交回复
热议问题