超全模态模型 × Harness 升级,升级解锁 ArkClaw,最新支持 DeepSeek-V4 系列与 GLM-5.1
将应用从Angular 13升级到14后,安装最新版ESLint并执行ng lint命令时,出现以下Node警告:
ng lint
(node:15376) UnhandledPromiseRejectionWarning: # (Use node --trace-warnings ... to show where the warning was created) (node:15376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:15376) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 目前仅知道降级回Angular 13可规避问题,现寻求其他解决方案,当前devDependencies配置如下:"devDependencies": { "@angular-devkit/build-angular": "^14.2.1", "@angular-eslint/builder": "14.0.3", "@angular-eslint/eslint-plugin": "14.0.3", "@angular-eslint/eslint-plugin-template": "14.0.3", "@angular-eslint/schematics": "14.0.3", "@angular-eslint/template-parser": "14.0.3", "@angular/cli": "^14.2.1", "@angular/compiler-cli": "^14.2.0", "@angular/language-service": "^14.2.0", "@ngxs/devtools-plugin": "~3.7.1", "@progress/kendo-licensing": "~1.2.2", "@types/lodash": "~4.14.168", "@typescript-eslint/eslint-plugin": "5.29.0", "@typescript-eslint/parser": "5.29.0", "@webcomponents/custom-elements": "^1.4.3", "eslint": "^8.18.0", "eslint-plugin-deprecation": "^1.3.2", "typescript": "^4.6.4" } 可行解决方案 #1. 对齐@angular-eslint包与Angular核心版本 #你的@angular-eslint系列包版本为14.0.3,但Angular核心包已升级到14.2.1,版本不匹配可能引发内部Promise处理异常。执行以下命令将所有@angular-eslint包升级到Angular 14对应的最新兼容版本:npm install @angular-eslint/builder@14.2.0 @angular-eslint/eslint-plugin@14.2.0 @angular-eslint/eslint-plugin-template@14.2.0 @angular-eslint/schematics@14.2.0 @angular-eslint/template-parser@14.2.0 --save-dev 若使用yarn则执行:yarn add @angular-eslint/builder@14.2.0 @angular-eslint/eslint-plugin@14.2.0 @angular-eslint/eslint-plugin-template@14.2.0 @angular-eslint/schematics@14.2.0 @angular-eslint/template-parser@14.2.0 --dev 2. 排查ESLint插件兼容性 #eslint-plugin-deprecation 1.3.2版本可能与ESLint 8.18.0存在兼容性问题,先尝试更新该插件到最新版:npm install eslint-plugin-deprecation@latest --save-dev 若更新后问题仍存在,可临时在.eslintrc.json中移除deprecation插件配置,再执行ng lint测试警告是否消失。3. 启用严格模式定位具体错误 #执行以下命令让Node在出现未处理Promise拒绝时直接终止并输出详细错误栈,帮助定位问题根源:node --unhandled-rejections=strict node_modules/@angular/cli/bin/ng lint 4. 清理依赖缓存后重装 #依赖缓存可能导致版本冲突,执行以下步骤重置依赖:删除node_modules文件夹:rm -rf node_modules(Windows环境用rd /s /q node_modules)删除package-lock.json或yarn.lock文件重新安装依赖:npm install或yarn install内容的提问来源于stack exchange,提问作者Bogdan Pătrăucean
node --trace-warnings ...
--unhandled-rejections=strict
目前仅知道降级回Angular 13可规避问题,现寻求其他解决方案,当前devDependencies配置如下:
"devDependencies": { "@angular-devkit/build-angular": "^14.2.1", "@angular-eslint/builder": "14.0.3", "@angular-eslint/eslint-plugin": "14.0.3", "@angular-eslint/eslint-plugin-template": "14.0.3", "@angular-eslint/schematics": "14.0.3", "@angular-eslint/template-parser": "14.0.3", "@angular/cli": "^14.2.1", "@angular/compiler-cli": "^14.2.0", "@angular/language-service": "^14.2.0", "@ngxs/devtools-plugin": "~3.7.1", "@progress/kendo-licensing": "~1.2.2", "@types/lodash": "~4.14.168", "@typescript-eslint/eslint-plugin": "5.29.0", "@typescript-eslint/parser": "5.29.0", "@webcomponents/custom-elements": "^1.4.3", "eslint": "^8.18.0", "eslint-plugin-deprecation": "^1.3.2", "typescript": "^4.6.4" }
你的@angular-eslint系列包版本为14.0.3,但Angular核心包已升级到14.2.1,版本不匹配可能引发内部Promise处理异常。执行以下命令将所有@angular-eslint包升级到Angular 14对应的最新兼容版本:
@angular-eslint
npm install @angular-eslint/builder@14.2.0 @angular-eslint/eslint-plugin@14.2.0 @angular-eslint/eslint-plugin-template@14.2.0 @angular-eslint/schematics@14.2.0 @angular-eslint/template-parser@14.2.0 --save-dev
若使用yarn则执行:
yarn add @angular-eslint/builder@14.2.0 @angular-eslint/eslint-plugin@14.2.0 @angular-eslint/eslint-plugin-template@14.2.0 @angular-eslint/schematics@14.2.0 @angular-eslint/template-parser@14.2.0 --dev
eslint-plugin-deprecation 1.3.2版本可能与ESLint 8.18.0存在兼容性问题,先尝试更新该插件到最新版:
eslint-plugin-deprecation
npm install eslint-plugin-deprecation@latest --save-dev
若更新后问题仍存在,可临时在.eslintrc.json中移除deprecation插件配置,再执行ng lint测试警告是否消失。
.eslintrc.json
deprecation
执行以下命令让Node在出现未处理Promise拒绝时直接终止并输出详细错误栈,帮助定位问题根源:
node --unhandled-rejections=strict node_modules/@angular/cli/bin/ng lint
依赖缓存可能导致版本冲突,执行以下步骤重置依赖:
node_modules
rm -rf node_modules
rd /s /q node_modules
package-lock.json
yarn.lock
npm install
yarn install
内容的提问来源于stack exchange,提问作者Bogdan Pătrăucean
超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起
模型再升级,30秒超长叙事, 模态参考扩容
模型自由,工具不限,最新支持 Deepseek-V4 系列、GLM-5.3 系列
超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列
大模型19元起,Al应用9.9元畅享,新人首购爆款尽享优惠