ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

bench.utils.CommandFailedError: npm install


#42

Thankyou @Arreis, finally it is working by creating a new user.


#43

You’re welcome @Khadija. I think that running ERPNext with a separated user is the recommended way although I’m not really sure why as I’m just getting started with this.

At the end, I was also able to make it work with my regular user by removing bench ( with pip ) , uninstalling yarn ( with npm ), purging nodejs (with apt) and then installing these packages again only this time I also installed yarn with apt instead of npm.

I’m not sure what was the exact step that made ERPNext recognize yarn with my regular user, but after I did this it started working.


#44

Ok I will try this too then


#45

Be aware that may depend on OS and/or host environment?

@BKM notes some caveats for eg Ubuntu 18.04 -ERPNext installation


#46

Sorry but can you explain?


#48

Just search to find BKM’s install experience notes with Ubuntu, CentOS and Debian versions, and also VPS host environments like the Google Cloud Platform (GCP).

For ERPNext to work on the various distinct platforms that are sought may demand some trial and error for a successful install, with clues and pointers that user’s report here.

One common issue has to do with permissions - the user account must have sudo privileges, but to install as root to overcome that causes problems too.


#49

OK now I am trying to understand all this


#50

Did you get this error after installing with a new user
INFO:bench.utils:setting up backups
crontabs/khadija/: fopen: Permission denied
INFO:bench.utils:setting up auto update
/var/spool/cron/: mkstemp: Permission denied
crontabs/khadija/: fopen: Permission denied
Bench frappe-bench initialized
/var/spool/cron/: mkstemp: Permission denied


#51

I did not :/. By any chance did you initialized the bench with another user? If so, either change the files ownership for the whole bench folder recursively to the new user or remove the bench and start the process from scratch with the new one.


#52

Yes that was the problem.