AssertionError ERR_ASSERTION:catch 子句变量不是 Error 实例

问题描述 投票:0回答:1

所以发生的事情是我无法在我的项目中设置身份验证、firestore 和云存储,它一直显示此错误,

[error] AssertionError [ERR_ASSERTION]: catch clause variable is not an Error instance

at assertIsError (C:\Users\PATH\node_modules\@angular\cli\src\utilities\error.js:19:26)
at AddCommandModule.runSchematic (C:\Users\PATH\node_modules\@angular\cli\src\command-builder\schematics-command-module.js:266:43)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async AddCommandModule.executeSchematic (C:\Users\PATH\node_modules\@angular\cli\src\commands\add\cli.js:279:20)
at async AddCommandModule.handler (C:\Users\PATH\node_modules\@angular\cli\src\command-builder\command-module.js:119:24)

这就是断言错误中的内容

function assertIsError(value) {
    const isError = value instanceof Error ||
        // The following is needing to identify errors coming from RxJs.
        (typeof value === 'object' && value && 'name' in value && 'message' in value);
    (0, assert_1.default)(isError, 'catch clause variable is not an Error instance');
}

我不知道是什么原因造成的,但我的所有包裹都是最新的

angular firebase ionic-framework angularfire
1个回答
0
投票

终于解决了! 我试过这个

npm install firebase-tools

并尝试再次设置消防功能,它起作用了

© www.soinside.com 2019 - 2024. All rights reserved.