I am running a demo from https://github.com/angular-in-action/portfolio to study angular .The Angular CLI version of the demo is so old(it uses version 1.3.2,but the latest version is 7.3.9) that so many dependencies have been out of date,so I update the dependency by
npm i -g npm-check-updates
ncu -u
But when I run the demo,it doesn't work.
From the log ,I can see that it was clarity-icons.min.js ,it has been move to the @clr/icons ,but I can not find where the code invokes the clarity-icons.min.js package,any idea?
here is package file :
{
"name": "portfolio",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.2.15",
"@angular/common": "^7.2.15",
"@angular/core": "^7.2.15",
"@angular/forms": "^7.2.15",
"@angular/http": "^7.2.15",
"@angular/platform-browser": "^7.2.15",
"@angular/platform-browser-dynamic": "^7.2.15",
"@angular/router": "^7.2.15",
"@clr/angular": "^1.1.3",
"@clr/icons": "^1.1.3",
"@clr/ui": "^1.1.3",
"@webcomponents/custom-elements": "^1.2.4",
"core-js": "^2.6.5",
"mutationobserver-shim": "^0.3.3",
"rxjs": "^6.5.2",
"tslib": "^1.9.0",
"webpack": "^4.31.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular/cli": "7.3.9",
"@angular/compiler": "^7.2.15",
"@angular/compiler-cli": "^7.2.15",
"@angular/language-service": "^7.2.15",
"@types/jasmine": "~3.3.12",
"@types/jasminewd2": "~2.0.6",
"@types/node": "~12.0.2",
"codelyzer": "^5.0.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"ts-node": "~8.1.0",
"tslint": "~5.16.0",
"typescript": "~3.2.2"
}
}
here is log file :
/snap/bin/node /snap/node/2023/lib/node_modules/npm/bin/npm-cli.js
run start --scripts-prepend-node-path=auto
> portfolio@0.0.0 start /home/maple/typescript/portfolio
> ng serve
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** 92% additional asset
processing scripts-webpack-plugin✖ 「wdm」: Error: ENOENT: no such
file or directory, open
'/home/maple/typescript/portfolio/node_modules/clarity-icons/clarity-icons.min.js'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Storage.provideSync (/home/maple/typescript/portfolio/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:98:13)
at CachedInputFileSystem.readFileSync (/home/maple/typescript/portfolio/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:259:32)
at Observable.rxjs_1.Observable.obs [as _subscribe] (/home/maple/typescript/portfolio/node_modules/@ngtools/webpack/src/webpack-input-host.js:35:51)
at Observable._trySubscribe (/home/maple/typescript/portfolio/node_modules/@ngtools/webpack/node_modules/rxjs/internal/Observable.js:44:25)
at Observable.subscribe (/home/maple/typescript/portfolio/node_modules/@ngtools/webpack/node_modules/rxjs/internal/Observable.js:30:22)
at SyncDelegateHost._doSyncCall (/home/maple/typescript/portfolio/node_modules/@angular-devkit/core/src/virtual-fs/host/sync.js:22:20)
at SyncDelegateHost.read (/home/maple/typescript/portfolio/node_modules/@angular-devkit/core/src/virtual-fs/host/sync.js:49:21)
at WebpackCompilerHost.readFileBuffer (/home/maple/typescript/portfolio/node_modules/@ngtools/webpack/src/compiler_host.js:125:44)
at VirtualFileSystemDecorator.readFile (/home/maple/typescript/portfolio/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:39:54)
at Promise (/home/maple/typescript/portfolio/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/scripts-webpack-plugin.js:69:49)
at new Promise (<anonymous>)
at scripts.map.fullPath (/home/maple/typescript/portfolio/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/scripts-webpack-plugin.js:68:24)
at Array.map (<anonymous>)
at hook (/home/maple/typescript/portfolio/node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/scripts-webpack-plugin.js:67:43)
ℹ 「wdm」: wait until bundle finished: /
To update your angular application, you should probably follow the Angular Update Guide.
With ncu -u
command, I think you are missing some essential steps like switching to HttpClientModule.
If you are using the guide, you will find all the necessary steps to correctly update you application.
I checked on the repo and it seems the version used is the 5.0.0-beta.6, so I guess you have to follow Angular Update Guide | 5.0 -> 7.0 for Basic Apps