Types not found

前端 未结 2 1820
礼貌的吻别
礼貌的吻别 2021-01-25 10:42

I just updated angular-cli (v1.1) and created a new project using ng new MyProj. Then I added and installed two dependencies to the project.json fi

相关标签:
2条回答
  • 2021-01-25 11:08

    I solved the problem removing types from tsconfig.app.json. This is the new configuration:

    {
        "extends": "../tsconfig.json",
        "compilerOptions": {
            "outDir": "../out-tsc/app",
            "module": "es2015",
            "baseUrl": ""
        },
        "exclude": [
            "test.ts",
            "**/*.spec.ts"
        ]
    }
    
    0 讨论(0)
  • Try doing import * as toastr from 'toastr' or import toastr from 'toastr' - the latter is if it has a default export.

    0 讨论(0)
提交回复
热议问题