Build Web Apps with Expressjs Challenge: Clonning Problem

When I try to clone using: git clone https://github.com/FreeCodeCamp/fcc-expressworks.git && chmod 744 fcc-expressworks/setup.sh && fcc-expressworks/setup.sh && source ~/.profile

I get this error at the end:

Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_module

And when I try to run it as admin, I get this:

fatal: destination path 'fcc-expressworks' already exists and is not an empty directory.

And even if I delete the files there and run it as admin again, I get:

chmod: changing permissions of 'fcc-expressworks/setup.sh': Operation not permitted

I solved it by putting sudo in front of each command (at the beginning, and after each &&). Thanks to @alpox. :slight_smile:

1 Like

If you are having need to use sudo command before each npm commands, then you can see the following article that i have published

i was trying to clone “git clone https://github.com/FreeCodeCamp/fcc-expressworks.git && chmod 744 fcc-expressworks/setup.sh && fcc-expressworks/setup.sh && source ~/.profile”

and I get this error message “…‘chmod’ is not recognized as an internal or external command operable program or batch file”.

Can anyone please help?..Thank you

---- “never mind i just answered my question”