【发布时间】:2022-06-28 13:26:08
【问题描述】:
我使用 Angular CLI 13.0.4 创建了一个新的 Angular 应用程序。它创建了一个 Angular 应用程序版本 ~13.0.0。当我使用命令ng build 时,出现以下错误:
./node_modules/css-loader/dist/runtime/api.js - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Transform failed with 1 error:
error: Invalid version: "15.2-15.3"
./node_modules/css-loader/dist/runtime/noSourceMaps.js - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Transform failed with 1 error:
error: Invalid version: "15.2-15.3"
这些是我使用的不同版本:
我应该怎么做才能修复这个错误?
----- 2022 年 3 月 2 日更新 ------
浏览器列表文件的内容:
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
【问题讨论】:
-
看看这个 -github.com/angular/angular-cli/issues/22606 发布您的浏览器列表文件
标签: angular-cli