Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Yeoman errors

I am new to Ubuntu and to Angular. I am attempting to set up a Yeoman framework. However each time I run the "yo" command. the following errors occur:

 Error: EACCES, mkdir '/home/diarmuid/tmp/npm-2997-20XPEB7W'
npm ERR!  { [Error: EACCES, mkdir '/home/diarmuid/tmp/npm-2997-20XPEB7W']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/home/diarmuid/tmp/npm-2997-20XPEB7W',
npm ERR!   parent: 'davidmoshertutorial' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.8.0-35-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/diarmuid/AngularTutorial/DavidMosherTutorial
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path /home/diarmuid/tmp/npm-2997-20XPEB7W
npm ERR! code EACCES
npm ERR! errno 3

Does anyone understand how to solve this? I tried to run "sudo yo" however I got response to :

change to change where npm stores global packages by
putting ~/npm/bin in your PATH and running:
npm config set prefix ~/npm

I ran to gedit ~/.profile and edited the file to this:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH:/~/npm/bin"
fi

I am obviously a bit lost. If anyone has any suggestions it would be much appreciated.

like image 300
Calgar99 Avatar asked May 31 '26 09:05

Calgar99


1 Answers

Run this command:

sudo chown -R `whoami` ~/tmp

the tmp folder within the home directory should be owned by the user, not by the admin.

like image 92
Ilan Frumer Avatar answered Jun 03 '26 06:06

Ilan Frumer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!