Installing Angular in Ubuntu upgrading from Angular 11 to 13

Viewed 276

I am having issues attempting to install Angular in my ubuntu instance. The end goal was to containerize the Angular application using podman with a Dockerfile.

Currently in windows as:

bruce@COBAR-DT MINGW64 /d/apps/angular/GCA-PNG (main)
$ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 11.0.5
Node: 14.15.3
OS: win32 x64

Angular: 11.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.5
@angular-devkit/build-angular   0.1100.5
@angular-devkit/core            11.0.5
@angular-devkit/schematics      11.0.5
@angular/cdk                    11.1.2
@schematics/angular             11.0.5
@schematics/update              0.1100.5
rxjs                            6.6.3
typescript                      4.0.5

Ubuntu:

root@COBAR-DT:~/GCA/GCA-PNG# ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 13.0.3
Node: 12.22.7
Package Manager: npm 8.1.4
OS: linux x64

Angular: <error>
... animations, cdk, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1300.3 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            13.0.3 (cli-only)
@angular-devkit/schematics      13.0.3 (cli-only)
@angular/cli                    13.0.3 (cli-only)
@schematics/angular             13.0.3 (cli-only)
rxjs                            6.6.7 (cli-only)
typescript                      <error>

Attempted to upgrade to Angular 12 in hopes to correct @angular-devkit/build-angular typescript

root@COBAR-DT:~/GCA/GCA-PNG# npx @angular/cli@12 update @angular/core@12 @angular/cli@12
Need to install the following packages:
  @angular/cli@12
Ok to proceed? (y) y
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
The installed local Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
✔ Package successfully installed.

root@COBAR-DT:~/GCA/GCA-PNG# ng update
Using package manager: 'npm'
Collecting installed dependencies...
Found 0 dependencies.
    We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cdk                       11.2.13 -> 12.2.9        ng update @angular/cdk@12
      @angular/cli                       11.0.7 -> 12.2.9         ng update @angular/cli@12
      @angular/core                      11.0.9 -> 12.2.9         ng update @angular/core@12

    There might be additional packages which don't provide 'ng update' capabilities that are outdated.
    You can update the additional packages by running the update command of your package manager.

Then from 12 to 13:

root@COBAR-DT:~/GCA/GCA-PNG# npx @angular/cli@13 update @angular/core@13 @angular/cli@13
Using package manager: 'npm'
Collecting installed dependencies...
Found 0 dependencies.
Package '@angular/core' is not a dependency.
root@COBAR-DT:~/GCA/GCA-PNG# ng build
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'
Require stack:
- /usr/lib/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /usr/lib/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/index.js
- /usr/lib/node_modules/@angular/cli/models/architect-command.js
- /usr/lib/node_modules/@angular/cli/commands/build-impl.js
- /usr/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /usr/lib/node_modules/@angular/cli/node_modules/@angular-devkit/schematics/tools/index.js
- /usr/lib/node_modules/@angular/cli/utilities/json-schema.js
- /usr/lib/node_modules/@angular/cli/models/command-runner.js
- /usr/lib/node_modules/@angular/cli/lib/cli/index.js
- /usr/lib/node_modules/@angular/cli/lib/init.js
See "/tmp/ng-EdH3rW/angular-errors.log" for further details.
0 Answers
Related