./bin/maintenance/build-assets.py errors

(env) user@ubuntu-server:~/dev/indico/src$ ./bin/maintenance/build-assets.py indico --dev --watch

gives:

warning: unable to access '/home/user/.config/git/ignore': Permission denied
warning: unable to access '/home/user/.config/git/attributes': Permission denied
warning: unable to access '/home/user/.config/git/attributes': Permission denied
warning: unable to access '/home/user/.config/git/attributes': Permission denied
Code being sent to the moon and back 🚀 🌑  [] 10% (0.0 seconds)
webpack is watching the files…

/home/user/dev/indico/src/node_modules/mkdirp/index.js:90
                    throw err0;
                    ^

Error: EACCES: permission denied, mkdir '/home/user/dev/indico/src/node_modules/.cache'
    at Object.mkdirSync (fs.js:764:3)
    at sync (/home/user/dev/indico/src/node_modules/mkdirp/index.js:71:13)
    at sync (/home/user/dev/indico/src/node_modules/mkdirp/index.js:77:24)
    at sync (/home/user/dev/indico/src/node_modules/mkdirp/index.js:77:24)
    at save (/home/user/dev/indico/src/node_modules/@babel/register/lib/cache.js:50:20)
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/home/user/dev/indico/src/node_modules/.cache'
}
Error: running webpack failed

(env) user@ubuntu-server:~/dev/indico/src$ sudo ./bin/maintenance/build-assets.py indico --dev --watch

gives:

Traceback (most recent call last):
  File "./bin/maintenance/build-assets.py", line 18, in <module>
    import click
ImportError: No module named click

:frowning: Stuck again…

did you use sudo at some point? check ownership & permissions of the folders where the “permission denied” error happens…

Yes, stuff was failing left and right without sudo, so I used it a couple of times somewhere, don’t remember where exactly. :frowning:

Which commands absolutely need sudo and which must not use sudo?

rm -rf ~/dev/indico and starting from scratch would be the easiest option. Otherwise, try sudo chown -R youruser:yourgroup ~/dev/indico.

You never need to use sudo except for places where the docs mention it (or “run as root”).

@10caret100 BTW, if you have quick questions it might be better to join our Matrix/IRC channel. The forum is not meant for immediate “tech support”.

@ThiefMaster, thank you once again for your superb support!

@pferreir, Got it! Thanks!

, fixed it! Indico is now up and running!

Thank you @ThiefMaster!