Beginner compile question for contacts app

Hello all,

I am stuck with this for 2 days (mornings) now, so I venture to ask in this forum. Please bear with me, as I am still finding my way here.

I am trying to see if I can make some contributions to the nextcloud contacts app.

  • I set up a developement nextcloud instance on my laptop,
  • I downloaded the nexcloud contacts source from github and compiled/made it:
    sudo -u www-data make (btw, is that the right way, doing everything as www-data user?)
    It compiles succesfully. So I started with babysteps. First make a few silly changes to a Vue file to see if I can.

But whatever I change in /src/components/ContactDetails.vue, I canā€™t get it to show in the browser.
I disabled http cache, enabled debug mode in Nextcloud config.php. What am I overlooking?

Regards,

Bert

I added the contacts app in the title to make it clearer.
@ChristophWurst will be glad about some help in the contacts app :wink:

1 Like

Hi Christoph,

Thanks. I didnā€™t add it, because I think this a general issueā€¦ (with my understanding of vue or nextcloud :frowning: )

I hope indeed I can help a bit with contacts in the near future.
On the topic of the contacts app, In order to succesfully make it, I had to change a line in composer.json. The file phpunit.integration.xml wasnā€™t found. I created an issue Contact app make fails on 'Could not read "phpunit.integration.xml' Ā· Issue #2588 Ā· nextcloud/contacts Ā· GitHub for this. It could of cours be that this also has something to do with my setup.

Bert

NPM ā€” Nextcloud latest Developer Manual latest documentation might help.

Use npm ci once to install front-end dependencies and npm run watch to start the process of watching files and triggering a compilation on demand.

Iā€™ll have a look

Hi Chtristoph, all,

Short message to share that I am still pursuing this, but also that I am making very little progress.
I am able to build the app after every change. I use npm run watch and I see that it starts rebuilding every time I change a file. It breaks when I put in an error, so I am sure it is actively updating contacts based on what I do.

But I still canā€™t see any of the changes. I use firefox and disabled the http cache. I even downloaded chromium, to make sure 100% it isnā€™t something in firefox. But also there there is the pristine original contacts app. without my changes.

I will continue searching what I do wrong, but I could use some inspiration where too look:-)

Regards,

Bert

Maybe Iā€™m on to something, (or maybe it is nothing)

When I run ā€˜npm run watchā€™ It mentions it is building contacts 4.0.2.
I have no idea where this version number comes from. The version in appinfo/info.xml is 4.1.0-alpha.1?? Is this correct?

bert@trout:/var/www/nextcloud/apps/contacts$ npm run watch

> contacts@4.0.2 watch
> NODE_ENV=development webpack --progress --watch --config webpack.js

Building contacts 4.0.2

Back with an other question.

I took a step back and cloned the app-tutorial app from github.
I hope that will shed some light on what I am doing wrong.

However, first of all it didnā€™t build and secondly it doesnā€™t install.
The build problem is described in 'make test' fails out-of-the-box Ā· Issue #363 Ā· nextcloud/app-tutorial Ā· GitHub
The install problem in Could not download app notestutorial Ā· Issue #6 Ā· nextcloud/app-tutorial Ā· GitHub

I think/hope both are fairly simple things. Could someone please take a look and help me further? CC @ChristophWurst

Kind regards,
Bert

Small update, still scratching my head.

I build the notestutorial app. I ran into a small hickup that I needed to rename the folder to be able to install it. But after that I was able to edit notestutorial/src/App.vue, rebuild and see the resulting change directly in the browser.

Tried the same thing again in contacts and alas, nothing seems to change in the browser. It feels like I am using a completely different instance of the app than I am working on.

Any pointer is appreciated.

Kind regards,

Bert

package.json

what versions of node/npm do you use?

Hi Christoph et. al.

Last evening I finally found out where the problem was.
When I started, and pulled the source from git, I moved the original nextcloud/apps/contacts out of the way with ā€œmv contacs ā€¦/ā€ So it went to the base nextcloud folder. I thought it would not do any harm there. My mistakeā€¦

I donā€™t know if it is a bug or a feature, but nextcloud picked up on that folder nextcloud/contacts instead of nextcloud/apps/contacts. So any changes I made in nexcloud/apps/contacts did not show up! Once I removed this nextcloud/contacts folder, my changes in nextcloud/apps/contacts became visible.

The one thing that is weird is that a version change in nextcloud/apps/contacts/appinfo did trigger an update. So apparently it did take some pieces from there as well.

Anyhow, now that I finally have a working source directory, I can start poking and seeing if I can do something useful in contacts!!

Bert