yarn
Maybe it is time to switch, or at least tryout yarn for a while. Especially the vulnerabilities handling which never works is at least gone in yarn.
installation
Corepack is advised to install yarn. corepack is part of the normal node installation so you probably can use it right away.
The package yarnpkg could be installed on debian, but it has version 1.22 while yarn seems to have arrived on v2 already.
corepack enable
corepack prepare yarn@stable --activate
Preparing yarn@stable for immediate activation...
yarn
usage
Right away you should know yarn is meant for more than only node. So it also needs you to specify what linker it uses.
Create a file called '.yarnrc.yml' with this content.
After this you will get a node_modules directory.
transition for planner
This is a test to see if yarn works better than npm. The first attempt ate compiling with the same package.json file as before gave these warnings:
yarn install
➤ YN0000: ┌ Resolution step
➤ YN0061: │ @types/googlemaps@npm:3.43.3 is deprecated: Types for the Google Maps browser API have moved to @types/google.maps. Note: these types are not for the googlemaps npm package, which is a Node API.
➤ YN0061: │ sourcemap-codec@npm:1.4.8 is deprecated: Please use @jridgewell/sourcemap-codec instead
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs
➤ YN0032: │ nice-napi@npm:1.0.2: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ node-addon-api@npm:3.2.1: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @angular-builders/custom-webpack@npm:14.1.0 [d9650] doesn't provide @types/node (pdd93b), requested by ts-node
➤ YN0002: │ @angular-builders/custom-webpack@npm:14.1.0 [d9650] doesn't provide typescript (p19007), requested by @angular-devkit/build-angular
➤ YN0002: │ @angular-builders/custom-webpack@npm:14.1.0 [d9650] doesn't provide typescript (p9be37), requested by ts-node
➤ YN0002: │ @angular/fire@npm:7.5.0 [d9650] doesn't provide webpack (pdfb2d), requested by file-loader
➤ YN0002: │ @firebase/analytics-compat@npm:0.2.5 [16a28] doesn't provide @firebase/app (p6d576), requested by @firebase/analytics
➤ YN0002: │ @firebase/app-check-compat@npm:0.3.4 [16a28] doesn't provide @firebase/app (pd2a77), requested by @firebase/app-check
➤ YN0002: │ @firebase/auth-compat@npm:0.3.7 [16a28] doesn't provide @firebase/app (pab689), requested by @firebase/auth
➤ YN0002: │ @firebase/auth-compat@npm:0.3.7 [16a28] doesn't provide @firebase/app-types (p2a75f), requested by @firebase/auth-types
➤ YN0002: │ @firebase/firestore-compat@npm:0.3.6 [16a28] doesn't provide @firebase/app (pdaba0), requested by @firebase/firestore
➤ YN0002: │ @firebase/firestore-compat@npm:0.3.6 [16a28] doesn't provide @firebase/app-types (p00d82), requested by @firebase/firestore-types
➤ YN0002: │ @firebase/functions-compat@npm:0.3.4 [16a28] doesn't provide @firebase/app (p4454e), requested by @firebase/functions
➤ YN0002: │ @firebase/installations-compat@npm:0.2.4 [16a28] doesn't provide @firebase/app-types (pd2633), requested by @firebase/installations-types
➤ YN0002: │ @firebase/messaging-compat@npm:0.2.4 [16a28] doesn't provide @firebase/app (p8b1a0), requested by @firebase/messaging
➤ YN0002: │ @firebase/performance-compat@npm:0.2.4 [16a28] doesn't provide @firebase/app (pa5577), requested by @firebase/performance
➤ YN0002: │ @firebase/remote-config-compat@npm:0.2.4 [16a28] doesn't provide @firebase/app (p64719), requested by @firebase/remote-config
➤ YN0002: │ @firebase/storage-compat@npm:0.3.2 [16a28] doesn't provide @firebase/app (p33b31), requested by @firebase/storage
➤ YN0002: │ @firebase/storage-compat@npm:0.3.2 [16a28] doesn't provide @firebase/app-types (p71ca3), requested by @firebase/storage-types
➤ YN0002: │ frontend@workspace:. doesn't provide @angular/animations (p03bdb), requested by @angular/material
➤ YN0002: │ frontend@workspace:. doesn't provide @angular/forms (p74711), requested by @angular/material
➤ YN0002: │ frontend@workspace:. doesn't provide @popperjs/core (pca16f), requested by bootstrap
➤ YN0060: │ frontend@workspace:. provides typescript (p101dc) with version 4.9.5, which doesn't satisfy what @angular-devkit/build-angular and some of its descendants request
➤ YN0060: │ frontend@workspace:. provides typescript (p6819c) with version 4.9.5, which doesn't satisfy what @angular/compiler-cli requests
➤ YN0002: │ frontend@workspace:. doesn't provide webpack (pdcda8), requested by compression-webpack-plugin
➤ YN0002: │ frontend@workspace:. doesn't provide zone.js (p93d29), requested by @angular/core
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 6s 992ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:21.1.1 can't be found in the cache and will be fet
➤ YN0013: │ yargs@npm:16.2.0 can't be found in the cache and will be fetched fr
➤ YN0013: │ yargs@npm:17.5.1 can't be found in the cache and will be fetched fr
➤ YN0013: │ yargs@npm:17.7.1 can't be found in the cache and will be fetched fr
➤ YN0013: │ yn@npm:3.1.1 can't be found in the cache and will be fetched from t
➤ YN0000: └ Completed in 1s 289ms
➤ YN0000: ┌ Link step
➤ YN0007: │ protobufjs@npm:6.11.3 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.15.5 must be built because it never has been before or the last one failed
➤ YN0007: │ nice-napi@npm:1.0.2 must be built because it never has been before or the last one failed
➤ YN0007: │ protobufjs@npm:7.2.3 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 8s 23ms
➤ YN0000: Done with warnings in 16s 473ms
But, it did finish. Does it run ?
yarn run startA
..
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
✖ Failed to compile.
The interface will always give :
So the mechanism works, but the code does not.
typescript
Error: Failed to initialize Angular compilation - The Angular Compiler requires TypeScript >=4.6.2 and <4.9.0 but 4.9.5 was found instead.
Easiest solution is to lower the typescript version.,