Home > Software design >  Some problem with build my application on angular 13
Some problem with build my application on angular 13

Time:03-18

I try to found solutions, on this problem... Because, is not on my code... Its is after update to latest npm and fs-extra...

Build at: 2022-03-16T13:33:13.718Z - Hash: aeac85e5815ce0c4 - Time: 7748ms

Error: node_modules/@angular-devkit/build-angular/node_modules/@angular-devkit/build-webpack/src/webpack-dev-server/index.d.ts:26:121 - error TS2307: Cannot find module '../../.
./core/src' or its corresponding type declarations.

26 declare const _default: import("@angular-devkit/architect/src/internal").Builder<WebpackDevServerBuilderSchema & import("../../../core/src").JsonObject>;
                                                                                                                           ~~~~~~~~~~~~~~~~~~~


Error: node_modules/@angular-devkit/build-angular/node_modules/@angular-devkit/build-webpack/src/webpack/index.d.ts:30:116 - error TS2307: Cannot find module '../../../core/src'
 or its corresponding type declarations.

30 declare const _default: import("@angular-devkit/architect/src/internal").Builder<RealWebpackBuilderSchema & import("../../../core/src").JsonObject>;
                                                                                                                      ~~~~~~~~~~~~~~~~~~~


Error: node_modules/@angular-devkit/build-angular/node_modules/webpack-dev-middleware/types/index.d.ts:204:27 - error TS2694: Namespace '"fs"' has no exported member 'StatSyncFn
'.

204   statSync?: import("fs").StatSyncFn;



Somebody having like solutions on this ?... I have try to re-install webpack-server, all indicated... Nothing to do...I don't understound why that's not working... How to proceed...?

Thanks to us for your help...

Here to package.json

  "name": "bonrefil",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.0.0",
    "@angular/cdk": "^13.2.6",
    "@angular/common": "~13.0.0",
    "@angular/compiler": "~13.0.0",
    "@angular/core": "~13.0.0",
    "@angular/forms": "~13.0.0",
    "@angular/material": "^13.2.6",
    "@angular/platform-browser": "~13.0.0",
    "@angular/platform-browser-dynamic": "~13.0.0",
    "@angular/router": "~13.0.0",
    "bootstrap": "^5.1.3",
    "bootstrap-icons": "^1.7.2",
    "fs-extra": "^10.0.1",
    "image-to-base64": "^2.2.0",
    "jquery": "^3.6.0",
    "popper.js": "^1.16.1",
    "rxjs": "~7.4.0",
    "tslib": "^2.3.0",
    "uuid": "^8.3.2",
    "xdata": "^2.1.17",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^13.2.6",
    "@angular-devkit/core": "^13.2.6",
    "@angular/cli": "~13.0.3",
    "@angular/compiler-cli": "~13.0.0",
    "@nguniversal/builders": "^13.0.2",
    "@types/jasmine": "~3.10.0",
    "@types/jquery": "^3.5.9",
    "@types/node": "^12.20.46",
    "@types/uuid": "^8.3.4",
    "@types/webpack-dev-server": "^4.7.2",
    "bootstrapvalidator": "^0.5.4",
    "jasmine-core": "~3.10.0",
    "karma": "~6.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "~1.7.0",
    "typescript": "~4.4.3",
    "webpack": "^5.70.0",
    "webpack-dev-middleware": "^5.3.1",
    "webpack-dev-server": "^4.7.4"
  }
}

CodePudding user response:

You need to update your @types/node version. If you update to at least 15.12.2 it should now work: See https://app.renovatebot.com/package-diff?name=@types/node&from=13.13.5&to=15.12.2

  • Related