Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: update Angular, NestJs, RxJS and others to latest versions #1427

Open
5 of 7 tasks
evereq opened this issue Oct 16, 2021 · 9 comments · Fixed by #1323
Open
5 of 7 tasks

Chore: update Angular, NestJs, RxJS and others to latest versions #1427

evereq opened this issue Oct 16, 2021 · 9 comments · Fixed by #1323

Comments

@evereq
Copy link
Member

evereq commented Oct 16, 2021

Before merging new features, we have to upgrade everything to the latest versions:

  • Server (API)
  • Admin
  • Merchant App
  • Mobile Shop App
  • Carrier App
  • Web Shop
  • Gatsby Shop

NOTE: all merged already to develop branch!

@evereq evereq added this to the v0.4 milestone Oct 16, 2021
@evereq evereq self-assigned this Oct 16, 2021
@evereq evereq added this to To do in Ever Demand Platform via automation Oct 16, 2021
@evereq evereq linked a pull request Oct 16, 2021 that will close this issue
2 tasks
@evereq
Copy link
Member Author

evereq commented Oct 25, 2021

During yarn build:admin we have following warnings:

  1. regarding browser compatibility (think it just tiny edit required in one file to fix that)
Warning: Support was requested for IE 10 in the project's browserslist configuration. This browser is no longer officially supported with Angular v11 and higher.
For more information, see https://v10.angular.io/guide/deprecations#ie-9-10-and-mobile
Warning: Support was requested for IE 11 in the project's browserslist configuration. IE 11 support is deprecated since Angular v12.
For more information, see https://angular.io/guide/browser-support
  1. node-sass - I tried to remove it before, but at that time some package had dependency on it... Maybe we can try to remove again?
 'node-sass' usage is deprecated and will be removed in a future major version. To opt-out of the deprecated behaviour and start using 'sass' uninstall 'node-sass'.
  1. something with ngx-swiper-wrapper, but no idea what is it honestly
Warning: Entry point 'ngx-swiper-wrapper' contains deep imports into 'E:/Coding/Ever/ever/packages/admin-web-angular/node_modules/swiper/types/swiper-events'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
  1. Tons of warnings like below
Warning: E:/Coding/Ever/ever/packages/common/src/notifications.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

@rahul-rocket
Copy link
Contributor

We need to enabled CORS in the code for socket polling connection.
Because we should assume that user who run code does not have that CORS extension installed.

@rahul-rocket
Copy link
Contributor

During yarn build:shopweb we have following issue:

../../node_modules/sass-extract-loader/index.js!./src/styles/_variables.scss - Error: Module build failed: Error: Cannot find module 'node-sass'
Require stack:
- D:\ever\ever-demand\node_modules\sass-extract\lib\render.js
- D:\ever\ever-demand\node_modules\sass-extract\lib\index.js
- D:\ever\ever-demand\node_modules\sass-extract-loader\index.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\webpack\lib\ProgressPlugin.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\webpack\lib\index.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular-devkit\build-webpack\src\webpack\index.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular-devkit\build-webpack\src\index.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular-devkit\build-angular\src\browser\index.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular-devkit\architect\node\index.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular\cli\models\architect-command.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular\cli\commands\build-impl.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular-devkit\schematics\tools\export-ref.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular-devkit\schematics\tools\index.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular\cli\utilities\json-schema.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular\cli\models\command-runner.js
- D:\ever\ever-demand\packages\shop-web-angular\node_modules\@angular\cli\lib\cli\index.js
- D:\ever\ever-demand\node_modules\@angular\cli\lib\init.js
- D:\ever\ever-demand\node_modules\@angular\cli\bin\ng
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (D:\ever\ever-demand\node_modules\sass-extract\lib\render.js:13:17)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (D:\ever\ever-demand\node_modules\sass-extract\lib\index.js:7:15)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)

@rahul-rocket
Copy link
Contributor

During onload window for admin yarn run:admin we have following issue.

ERROR TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable. at e (main.js:1) at P (main.js:1) at main.js:1 at s.<anonymous> (main.js:1) at main.js:1 at Q (main.js:1) at Ae.subscribe (main.js:1) at u (main.js:1) at main.js:1 at ne.<anonymous> (main.js:1)

@rahul-rocket
Copy link
Contributor

During yarn run:shopweb, we have following issues/warnings.

  1. TypeScript compilation related warnings
Warning: D:/ever/ever-demand/packages/common-angular/src/components/ngx-barcode/ngx-barcode.component.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common-angular/src/components/ngx-barcode/ngx-barcode.module.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common-angular/src/index.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common-angular/src/locale/image-locales.service.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common-angular/src/pipes/index.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common-angular/src/routers/products-category-router.service.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common-angular/src/routers/warehouse-users.service.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common/src/routers/IProductsCategoryRouter.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/common/src/routers/IWarehouseUsersRouter.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/app.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/pm2bootstrap.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/scripts/env.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/src/app/+products/product-details/buy-product/buy-product.component.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/src/app/+products/product-details/buy-product/index.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/src/app/about/index.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/src/app/app.e2e.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/src/app/authentication/authentication.service.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:/ever/ever-demand/packages/shop-web-angular/src/environments/environment.prod.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: D:\ever\ever-demand\packages\common-angular\src\lib\router\ObservableRequest.ts depends on 'uuid'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

  1. Webpack compilation issues
URIError: Failed to decode param '/%3C%=%20htmlWebpackPlugin.options.metadata.baseUrl%20%%3E'
    at decodeURIComponent (<anonymous>)
    at decode_param (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\layer.js:172:12)
    at Layer.match (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\layer.js:123:27)
    at matchLayer (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:574:18)
    at next (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:220:15)
    at expressInit (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\middleware\init.js:40:5)
    at Layer.handle [as handle_request] (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:317:13)
    at D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:335:12)
    at next (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:275:10)
    at query (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\middleware\query.js:45:5)
    at Layer.handle [as handle_request] (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:317:13)
    at D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (D:\ever\ever-demand\packages\shop-web-angular\node_modules\express\lib\router\index.js:335:12)
URIError: Failed to decode param '/%3C%=%20htmlWebpackPlugin.options.metadata.baseUrl%20%%3E'

@rahul-rocket
Copy link
Contributor

@evereq

Ever Server - Building & Running Successfully.
	- yarn run:server
	- yarn run build:server

Ever Admin - Building & Running Successfully.
	- yarn run:admin
	- yarn run build:admin

Ever Merchant Ionic - Its building & running successfully.
	https://www.loom.com/share/1b892a23212841a6a48f12ac1c8ee8ff
	- yarn run:merchant
	- yarn run build:merchant

Ever Carrier Ionic - Its building & running successfully.
	https://www.loom.com/share/568a3aad710d4af49574a1b5499479ce
	- yarn run:carrier
	- yarn run build:carrier

Ever Mobile Shop - Its building & running UI loading successfully.
	https://www.loom.com/share/01b67dbadb5c4e1fa9996d82d870031f
	- yarn run:shopmobile
	- yarn run build:shopmobile

@evereq
Copy link
Member Author

evereq commented Nov 23, 2021

@rahul-rathore-576 we need to fix below warnings

@ever-platform/merchant-tablet-ionic: Warning: e:/Coding/Ever/ever/packages/merchant-tablet-ionic/app.ts is part of the TypeScript compilation but it's unused.
@ever-platform/merchant-tablet-ionic: Add only entry points to the 'files' or 'include' properties in your tsconfig.
@ever-platform/merchant-tablet-ionic: Warning: e:/Coding/Ever/ever/packages/merchant-tablet-ionic/pm2bootstrap.ts is part of the TypeScript compilation but it's unused.
@ever-platform/merchant-tablet-ionic: Add only entry points to the 'files' or 'include' properties in your tsconfig.
@ever-platform/merchant-tablet-ionic: Warning: e:/Coding/Ever/ever/packages/merchant-tablet-ionic/scripts/env.ts is part of the TypeScript compilation but it's unused.
@ever-platform/merchant-tablet-ionic: Add only entry points to the 'files' or 'include' properties in your tsconfig.
@ever-platform/merchant-tablet-ionic: Warning: e:/Coding/Ever/ever/packages/merchant-tablet-ionic/src/environments/environment.prod.ts is part of the TypeScript compilation but it's unused.
@ever-platform/merchant-tablet-ionic: Add only entry points to the 'files' or 'include' properties in your tsconfig.

@evereq
Copy link
Member Author

evereq commented Dec 4, 2021

Few more updates to be done:

  1. DONE - Update apollo-client and many other related packages to @apollo/client, see https://apollo-angular.com/docs/migration in all our projects (WIP by @evereq)

  2. Angular 13 everywhere :)

  3. Web Shop should be switched off from Angular Starter https://github.com/PatrickJS/angular-starter, e.g. like it's done in https://github.com/xmlking/ngx-starter-kit/tree/develop/apps/webapp (basically it's "Standard" Angular app now)

  4. In Gasby Shop we should get rid of package apollo-boost (already removed from package.json) as it's not updated anymore and just use "@apollo/client": and possibly other dependencies manually (if they are needed).
    Most changes are to be done in the src/apollo/client.tsx file I think...

Ever Demand Platform automation moved this from To do to Done Dec 5, 2021
@evereq evereq reopened this Dec 5, 2021
Ever Demand Platform automation moved this from Done to In progress Dec 5, 2021
@evereq
Copy link
Member Author

evereq commented Dec 5, 2021

@rahul-rathore-576 please work on 2 and 1 next from #1427 (comment). I.e. first let's fix Web Shop and next upgrade everywhere Angular 13.

evereq added a commit that referenced this issue Dec 9, 2021
* feat: angular upgrade v12 to v13 for admin web angular #1427

* fix: updated yarn.lock

* feat: angular upgrade v12 to v13 for carrier mobile ionic #1427

* feat: feat: angular upgrade v12 to v13 for common angular #1427

* feat: feat: angular upgrade v12 to v13 for merchant tablet ionic #1427

* feat: angular upgrade v12 to v13 for shop mobile ionic #1427

* feat: angular upgrade v12 to v13 for root package #1427

* fix: updated `yarn.lock` for root packages

* fix: shop mobile ionic build issue

* fix: updated typescript v4.4.4 everywhere

* fix: .gitignore angular cache directory

Co-authored-by: RAHUL RATHORE <rahulrathore576@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Ever Demand Platform
  
In progress
Development

Successfully merging a pull request may close this issue.

2 participants