小编sin*_*nan的帖子

找不到模块:错误:node_modules/@angular-devkit/build-angular/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js'

我将我的项目 Angular 版本 14.0.0 降级到 13.0.0 以修复此错误Mat 对话框关闭按钮在 IOS 设备上不起作用

按照 如何降级角度版本?的答案

但降级后,当我尝试通过 ng 服务运行时,我收到此错误

我检查了指定的文件夹,其中存在文件 asyncToGenerator.js

./node_modules/idb/build/index.js:1:0-211 - Error: Module not found: Error: Can't resolve '/Volumes/Macintosh HD/Users/ravi/Public/new_mob/node_modules/@angular-devkit/build-angular/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js' in '/Volumes/Macintosh HD/Users/ravi/Public/new_mob/node_modules/idb/build'
Run Code Online (Sandbox Code Playgroud)

我试过

npm install --save-dev @angular-devkit/build-angular
Run Code Online (Sandbox Code Playgroud)

仍然遇到同样的错误

我的 package.json 文件是

{
  "name": "new-design",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve --poll=2000",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular-slider/ngx-slider": "^2.0.4",
    "@angular/animations": "^13.0.0", …
Run Code Online (Sandbox Code Playgroud)

angular

13
推荐指数
1
解决办法
4935
查看次数

标签 统计

angular ×1