Hi,
I have updated ABP pacakges for aspnet-core solution from version 2.7.0 to 3.0.4 using ABP CLI update command. The packages are updated, compiled successfully and swagger API is running fine. However, when I updated Angular solution using ABP CLI update command, I updated npm modules using yarn command and when I try to run application using yarn start, I'm getting below error, could you please advise on steps to resolve it?
9 Answer(s)
-
0
hi
Please share the
package.json
file of your angular project. -
0
Hi,
Below is the package.json file of Angular project. Note - I referred to following link for migration - https://docs.abp.io/en/abp/latest/UI/Angular/Migration-Guide-v3
{ "name": "Litmus", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --open", "build": "ng build", "build:prod": "ng build --configuration production", "test": "jest", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "jest": { "preset": "jest-preset-angular", "setupFilesAfterEnv": [ "<rootDir>/setupJest.ts" ], "testPathIgnorePatterns": [ "<rootDir>/node_modules/", "<rootDir>/dist/", "<rootDir>/src/test.ts" ] }, "dependencies": { "@abp/ng.setting-management": "~3.0.4", "@angular/animations": "~10.0.5", "@angular/cdk": "^10.1.0", "@angular/common": "~10.0.5", "@angular/compiler": "~10.0.5", "@angular/core": "~10.0.5", "@angular/forms": "~10.0.5", "@angular/material": "^10.1.0", "@angular/platform-browser": "~10.0.5", "@angular/platform-browser-dynamic": "~10.0.5", "@angular/router": "~10.0.5", "@types/jest": "^26.0.0", "@volo/abp.ng.account": "~3.0.4", "@volo/abp.ng.audit-logging": "~3.0.4", "@volo/abp.ng.identity": "~3.0.4", "@volo/abp.ng.identity-server": "~3.0.4", "@volo/abp.ng.language-management": "~3.0.4", "@volo/abp.ng.saas": "~3.0.4", "@volo/abp.ng.text-template-management": "~3.0.4", "@volo/abp.ng.theme.lepton": "~3.0.4", "jest": "^26.0.1", "jest-preset-angular": "^8.2.1", "rxjs": "~6.6.0", "tslib": "^2.0.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1000.4", "@angular-devkit/build-ng-packagr": "~0.1000.4", "@angular/cli": "~10.0.4", "@angular/compiler-cli": "~10.0.5", "@angular/language-service": "~10.0.5", "@ngxs/logger-plugin": "^3.6.2", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", "ng-packagr": "^10.0.0", "ngxs-schematic": "^1.1.9", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.9.7" }, "resolutions": { "@abp/ng.core": "~2.7.0", "@abp/ng.feature-management": "~2.7.0", "@abp/ng.theme.shared": "~2.7.0", "@abp/ng.permission-management": "~2.7.0", "@abp/ng.setting-management.config": "~2.7.0", "@abp/utils": "~2.7.0", "@volo/abp.commercial.ng.ui": "~2.7.0", "@volo/abp.ng.account.config": "~2.7.0", "@volo/abp.ng.audit-logging.config": "~2.7.0", "@volo/abp.ng.language-management.config": "~2.7.0", "@volo/abp.ng.identity-server.config": "~2.7.0", "@volo/abp.ng.identity.config": "~2.7.0", "@volo/abp.ng.saas.config": "~2.7.0", "@volo/abp.ng.text-template-management.config": "~2.7.0" } }
-
0
hi
The
@abp/*
and@volo/*
in yourpackages.json
has not been successful upgrading tov3.0.4
.when I updated Angular solution using ABP CLI update command
Can you share the
abp update
command output? -
0
-
0
hi @Repunjay
You can create a new project and refer to it's
angular/packages.json
to change your project.I will check why the cli doesn't update the angular packages.
-
0
@Repunjay Can you delete "resolutions" object in your package.json, then delete yarn.lock file and try again?
-
0
@yekalkan I tried with steps suggested by you but now getting below error. Also attached are the logs.
`[error] Error: Cannot find module '@angular-devkit/build-angular/package.json' Require stack:
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\architect\node\node-modules-architect-host.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\architect\node\index.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\commands\serve-impl.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\tools\export-ref.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\schematics\tools\index.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\utilities\json-schema.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\lib\cli\index.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\lib\init.js
- C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\bin\ng at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15) at Function.resolve (internal/modules/cjs/helpers.js:78:19) at WorkspaceNodeModulesArchitectHost.resolveBuilder (C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\node_modules@angular-devkit\architect\node\node-modules-architect-host.js:41:41) at ServeCommand.initialize (C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:71:63) at async ServeCommand.validateAndRun (C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\models\command.js:124:9) at async Object.runCommand (C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js:201:24) at async default_1 (C:\Users\p7110058\AppData\Roaming\npm\node_modules@angular\cli\lib\cli\index.js:62:31)`
-
0
Hi @Repunjay
I have found a solution on Stackoverflow.
Can you also check your node version? You can run the following command to learn the version:
node --version
It should be v12.x.x
-
0
closed due to inactivity...