Source : Yeoman: Getting it to Work on Ubuntu
Si l’installation de Yeoman sur Ubuntu Server vous pète à la tronche (en vous affichant, par exemple, un message d’erreur de ce style) :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
npm ERR! Linux 4.4.0-22-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "yo" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! at Error (native) npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! Please include the following file with any support request: npm ERR! /home/frank/npm-debug.log |
1. Installer Node
1 |
sudo apt-get update; sudo apt-get upgrade; sudo apt-get install build-essential openssl libssl-dev curl |
1 |
sudo apt-get install nodejs; sudo ln -s /usr/bin/nodejs /usr/bin/node; curl https://npmjs.org/install.sh | sudo sh |
2. Pouvoir tout installer avec NPM
1 |
echo prefix = ~/.node >> ~/.npmrc; echo 'export PATH=$HOME/.node/bin:$PATH' >> ~/.bashrc; . ~/.bashrc |
3. Installer Yeoman
1 |
npm install -g yo |
Tester en tapant simplement la commande :
1 |
yo |