Compile Issue

Hi,

I am trying to compile the project since I made some changes specifically with the room name generator. Two things happen, an error in using make command and second, the all the files in lib directory are gone after doing the steps.

Hi @saghul,

Can you please help me with this one. I am having issues with just changing the room name generator for few days already. Here is the error that I get when I npm install and no error when I use install-local. However, when I run make it show makefile error 127

NPM install error

thub.com/trentrichardson/jQuery-Impromptu.git /root/.npm/_cacache/tmp/git-clone
-397ed643
npm verb stack fatal: could not create leading directories of '/root/.npm/_caca
che/tmp/git-clone-397ed643': Permission denied
npm verb stack 
npm verb stack     at ChildProcess.exithandler (child_process.js:299:12)
npm verb stack     at ChildProcess.emit (events.js:193:13)
npm verb stack     at maybeClose (internal/child_process.js:999:16)
npm verb stack     at Socket.stream.socket.on (internal/child_process.js:403:11
)
npm verb stack     at Socket.emit (events.js:193:13)
npm verb stack     at Pipe._handle.close (net.js:614:12)
npm verb cwd /usr/share/jitsi-meet
npm verb Linux 5.3.0-1019-aws
npm verb argv "/usr/bin/node" "/usr/bin/npm" "install" "--verbose"
npm verb node v11.15.0
npm verb npm  v6.7.0
npm ERR! code 128
npm ERR! Command failed: git clone --depth=1 -q -b v6.0.0 git://github.com/tren
trichardson/jQuery-Impromptu.git /root/.npm/_cacache/tmp/git-clone-397ed643
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tm
p/git-clone-397ed643': Permission denied
npm ERR! 
npm verb exit [ 1, true ]
npm timing npm Completed in 13441ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-26T14_18_37_082Z-debug.log```

Node.js >= 12 and npm >= 6 are required

If you have simply installed nodejs and npm from your linux distribution then you are likely to use an old version, i notice that the node js version on your machine is version 11:

npm verb node v11.15.0
npm verb npm  v6.7.0

#I would reccomend you to upgrade nodejs manually
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh
cat nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs

#and then while you are at it upgrade npm to the latest version
sudo npm install -g npm@latest

#after that run according to the developement guide
npm install
make

After the build is complete then the compiled version of the web interface is found in the libs folder

Hi @xranby

When I run npm install and make command this is the error:

npm ERR! Command failed: git clone --depth=1 -q -b v6.0.0 git://github.com/tren
trichardson/jQuery-Impromptu.git /root/.npm/_cacache/tmp/git-clone-e151fa0d
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tm
p/git-clone-e151fa0d': Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-26T14_57_34_771Z-debug.log
root@sparksoft:/home/ubuntu/jitsi-meet# make
./node_modules/.bin/webpack -p
make: ./node_modules/.bin/webpack: Command not found
Makefile:19: recipe for target 'compile' failed
make: *** [compile] Error 127```

Can you try run the whole build as a normal non-root user outside of the root folder with a clean git checkout?
The error simply tells you that you do not have the permission to write to the root folder.

Hi @xranby,

Here’s what I get after running make. As for npm install it didnt show any error

        | ./react/features/base/util/uri.js 16.1 KiB [built]
        | ./modules/transport/index.js 1.26 KiB [built]
        | ./react/features/base/util/parseURLParams.js 1.46 KiB [built]
        | ./react/features/base/util/strings.web.js 240 bytes [built]
        | ./modules/API/constants.js 768 bytes [built]
        | ./react/features/base/util/index.js 178 bytes [built]
        | ./react/features/base/util/helpers.js 2.37 KiB [built]
        | ./react/features/base/util/httpUtils.js 1.06 KiB [built]
        | ./react/features/base/util/loadScript.web.js 555 bytes [built]
        | ./react/features/base/util/openURLInBrowser.web.js 183 bytes [built]
        | ./react/features/base/util/timeoutPromise.js 1.06 KiB [built]
        + 4 hidden modules
    
    ERROR in ./modules/transport/index.js
    Module not found: Error: Can't resolve 'js-utils/transport' in '/usr/share/jitsi-meet/modules/transport'
     @ ./modules/transport/index.js 5:0-76 6:0-50 6:0-50 34:20-29 35:19-46
     @ ./modules/API/external/external_api.js
     @ ./modules/API/external/index.js
    
    ERROR in chunk external_api [entry]
    external_api.min.js
    /usr/share/jitsi-meet/node_modules/babel-loader/lib/index.js??ref--4!/usr/share/jitsi-meet/modules/API/external/external_api.js 228e
f96b445f2a778781cde8f8f18979
    Unexpected token (37:20)
    | function getJitsiMeetTransport() {
    |   if (!transport) {
    |     transport = new !(function webpackMissingModule() { var e = new Error("Cannot find module 'js-utils/transport'"); e.code = 'MO
DULE_NOT_FOUND'; throw e; }())({
    |       backend: new !(function webpackMissingModule() { var e = new Error("Cannot find module 'js-utils/transport'"); e.code = 'MOD
ULE_NOT_FOUND'; throw e; }())({
    |         postisOptions
Makefile:19: recipe for target 'compile' failed
make: *** [compile] Error 2
ubuntu@sparksoft:~/jitsi-meet$

Hi @xranby @saghul,

What do I need to do with this error regarding transport?

Is your forked repo updated to the upstream?

I did a quick search in the forum and other people who ran into this issue solved it by upgrading nodejs from PPA

Hi @xranby,

I already did that by following this Compile Issue and still not able to fix the issue. The versions that I have right now are the ones on the link

ubuntu@sparksoft:~$ npm -v
6.14.5
ubuntu@sparksoft:~$ node -v
v12.16.3```

Yes

I am puzzled and do not know why it do not work for you, i did a test build using:

$ nodejs --version
v12.17.0
$ npm -version
6.14.5

then i checkout the latest sourcecode into the home directory and built it without problems:

cd ~
git clone https://github.com/jitsi/jitsi-meet/
cd jitsi-meet
npm install
make

Hmm, not sure as well because what I did was the quick installation process then cloned modules dir and now stuck with this

to prune old downloaded modules do:

and then try run

npm install
make

again

Hi,

I tried to build like what you did by cloning and simply running install and make to check if I should clean install jitsi again byjust cloning it. Here’s what happens:

asm.git /root/.npm/_cacache/tmp/git-clone-6db20bc9
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone
-6db20bc9': Permission denied
npm ERR! 
npm WARN tar ENOENT: no such file or directory, open '/home/jitsi-meet/node_modules/.stagi
ng/bc-css-flags-48b34bfb/lib/region-flags/svg/US-LA.svg'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-05-27T09_13_48_042Z-debug.log
root@sparksoft:/home/jitsi-meet# make
./node_modules/.bin/webpack -p
make: ./node_modules/.bin/webpack: Command not found
Makefile:19: recipe for target 'compile' failed
make: *** [compile] Error 127
root@sparksoft:/home/jitsi-meet# 

as for damencho’s thread, I already tried it and still not working

  • try not to use the root home directory, or the root, #, user … it give you the permission denied errors
  • compile as a regular user, kyjovs, in the regular users home directory for example /home/kyjovs/jitsi-meet
  • you can try clear the nodejs module cache by removing jitsi-meet/node_modules
  • you can try clear the npm cache by removing ~/.npm

Hi @xranby @saghul ,

I think running npm install and make worked. Below is the screenshot. By that can I just edit the roomNameGenerator and will it take effect right away?

1 Like

Your build succeded!

in order for the changes to take effect you have two alternatives:

A: you need copy the files in
jitsi-meet/css and jitsi-meet/libs to where nginx have configured the web-root directory, typically /usr/share/jitsi-meet/
you can automate this copy step by creating a file called deploy-local.sh that file is executed at the end of the build to copy the files to the right location.

B: change the nginx configuration
and use your /home/jitsi-meet as the web-root, by doing that your custom web interface do not get overwritten each time you update the jitsi-meet packages.


while testing, make sure that your webbrowser do not use an old cached version of the javascript and ccs files. ctrl + F5
I typically test using an incognito window since it do not cache all javascript code.

Okay, so if I do the same process in my original project which is in usr/share/jitsi-meet no need to copy paste? Because that is where the problem kicks in about the transport.

UPDATE:

Tried it again in my orginal project but transport issue still shows up

I do not recommend that you try build directly at the /usr/share/jitsi-meet location on the server

if your build succeeded on your ubuntu@sparksoft machine then you can simply copy the built files using scp from that machine to the /usr/share/jitsi-meet location on server.

if you want your custom files to survive an apt-get update and apt-get upgrade of the jitsi-meet packages then change the nginx configuration on the server and upload the files to the location you chose for root in the nginx config.

1 Like