webpack TS2304 Cannot find name 'Map', 'Set', 'Promise'

后端 未结 15 2332
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 07:07

I have the following webpack.config.js

var path = require(\"path\");
var webpack = require(\'webpack\');

module.exports = {
  entry: {
    \'ng2-auto-comple         


        
15条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 07:43

    To resolve this error change the following properties in tsconfig.json file.

    "lib": [
          "es2018",
          "dom",
          "es5", 
          "es6"
        ],
    "module": "es2015",
    "target": "es6"
    

    After that run following command in the terminal.

    npm install @types/es6-shim
    

    ERROR RESOLVED.

提交回复
热议问题