Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

前端 未结 6 992
迷失自我
迷失自我 2020-12-24 10:42

Has anyone faced below warning in \"ng serve\"?

WARNING in ./node_modules/@angular/compiler/src/util.js 10:24-31 Critical dependency: require functi

6条回答
  •  时光取名叫无心
    2020-12-24 11:10

    I experienced same error, when I've imported by mistake EventEmitter from protractor instead of @angular/core.

    Changing import { EventEmitter } from 'protractor'; to import { EventEmitter } from '@angular/core'; fixed it.

提交回复
热议问题