#4 Issue in building the app
Closed 9 months ago by amitosh. Opened 10 months ago by amitosh.

Building the app currently fails with ionic complaining about a missing tsconfig.json.

Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser - 
Ctrl+C to cancel
[00:52:06]  watch started ... 
[00:52:06]  build dev started ... 
Error: tsconfig: Cannot read file '/home/amitosh/Code/gsoc/Fedora-app/tsconfig.json': ENOENT: no such file or directory, open '/home/amitosh/Code/gsoc/Fedora-app/tsconfig.json'.
    at new BuildError (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at getTsConfig (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/transpile.js:313:15)
    at Object.<anonymous> (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/transpile.js:298:46)
    at step (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/transpile.js:32:23)
    at Object.next (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/transpile.js:13:53)
    at /home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/transpile.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/transpile.js:3:12)
    at Object.getTsConfigAsync (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/transpile.js:295:12)
    at Object.validateRequiredFilesExist (/home/amitosh/Code/gsoc/Fedora-app/node_modules/@ionic/app-scripts/dist/build/util.js:89:21)
[00:52:06]  Proxy added:/facebook/ => https://graph.facebook.com/v2.6/ 
[00:52:06]  Proxy added:/twitter/ => https://api.twitter.com/1.1/ 
[00:52:06]  Proxy added:/fedocal/ => https://apps.fedoraproject.org/calendar/api/ 
[00:52:06]  Proxy added:/fedoramag/ => https://fedoramagazine.org/wp-json/wp/v2/ 
[00:52:06]  Proxy added:/askfedora/ => https://ask.fedoraproject.org/en/api/v1/ 

Manually running gulp build doesn't complete either.

[01:50:49] Using gulpfile ~/Code/gsoc/Fedora-app/gulpfile.js
[01:50:49] Starting 'clean'...
[01:50:49] Finished 'clean' after 37 ms
[01:50:49] Starting 'build'...
[01:50:49] Starting 'sass'...
[01:50:49] Starting 'html'...
[01:50:49] Starting 'fonts'...
[01:50:49] Starting 'images'...
[01:50:49] Starting 'scripts'...
[01:50:49] Finished 'images' after 11 ms
app/theme/app.variables.scss
Error: File to import not found or unreadable: globals.core
       Parent style sheet: /home/amitosh/Code/gsoc/Fedora-app/app/theme/app.variables.scss
        on line 7 of app/theme/app.variables.scss
>> @import 'globals.core';
   ^

[01:50:49] Finished 'sass' after 34 ms
[01:50:49] Finished 'scripts' after 55 ms
[01:50:49] Finished 'html' after 57 ms
[01:50:49] Finished 'fonts' after 60 ms
[01:50:55] Finished 'build' after 5.56 s

Metadata Update from @a2batic:
- Issue tagged with: gsoc

10 months ago

@amitosh, thank for creating an issue for this. The application dependencies are old, and has to be reworked. application can be run by 2 steps :
1. npm install
2. ionic serve

@a2batic, I'll be trying to upgrade ionic to v3 and Angular to v5 over this weekend. It will be a really big PR, I think

@amitosh, I feel it will be just dependency errors, it is better if you discuss here and then start working on it.

@a2batic, Here's what I found:

  1. The app uses pre-release ionic-v2, a lot of breaking changes occured somewehre in the RC stage before v2 was out for GA,
  2. Ionic removed support for pure JS, they now use TS exclusively.
  3. Ionic native has been split into a core sub-modules for functionality like Calendar.
  4. Http Provider has been changes, thus all providers depending on Fedora APIs need to be updated as well.
  5. Styles and classes have been changed a bit.

Overall, most component classes need a few changes.

Here's my plan for this:

  1. Update deps inpackage.json to latest ionic-v3.
  2. Convert JS into TS.
  3. Make changes to dependency injection methods to match the latest APIs.
  4. Upgrade usage of ionic-native
  5. Update providers to use the new HttpClient

Here is the CHANGELOG for Ionic. We will first be migrating to v2 then v3.

Hi @amitosh,

Sorry, it took me long to reply. I was trying to find an easier way to do this task. But your observation seems right, it will be great if you take up this task, I will assign this issue to you.

@a2batic, Here's what I found:

The app uses pre-release ionic-v2, a lot of breaking changes occured somewehre in the RC stage before v2 was out for GA,
Ionic removed support for pure JS, they now use TS exclusively.
Ionic native has been split into a core sub-modules for functionality like Calendar.
Http Provider has been changes, thus all providers depending on Fedora APIs need to be updated as well.
Styles and classes have been changed a bit.

Overall, most component classes need a few changes.
Here's my plan for this:

Update deps inpackage.json to latest ionic-v3.
Convert JS into TS.
Make changes to dependency injection methods to match the latest APIs.
Upgrade usage of ionic-native
Update providers to use the new HttpClient

Here is the CHANGELOG for Ionic. We will first be migrating to v2 then v3.

I will be around on IRC and Telegram (@a2batic), you can reach out to me whenever required.

Metadata Update from @a2batic:
- Issue assigned to amitosh

10 months ago

Metadata Update from @a2batic:
- Issue status updated to: Closed (was: Open)

9 months ago

Login to comment on this ticket.

Metadata