I am discovering Yeoman and I try to install a simple generator shown in yeoman's "Getting Started" section..
I installed npm then yo and bower like explained in the documentation :
npm install -g yo bower
When I try to install generator-webapp and generator-spring (sudo npm install -g generator-webapp), I get this output in both cases:
[...]
npm http 304 https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/es6-iterator
npm http 304 https://registry.npmjs.org/es6-symbol
npm ERR! peerinvalid The package yo does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer generator-mocha#0.1.6 wants yo#>=1.0.0
npm ERR! peerinvalid Peer generator-spring#0.1.2 wants yo#>=1.0.0-rc.1
npm ERR! peerinvalid Peer generator-webapp#0.5.1 wants yo#>=1.2.0
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "generator-webapp"
npm ERR! cwd /home/adenoyelle
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/adenoyelle/npm-debug.log
npm ERR! not ok code 0
Hence, I looked at yo version's :
~ [ sudo npm update -g yo
npm http GET https://registry.npmjs.org/yo
npm http 304 https://registry.npmjs.org/yo
~ [ yo -version
1.1.2
So, I have a few questions :
Why Yo's version is stuck to 1.1.2 (It seems that a version 1.3.3 exists)
Why does Yo also try to get generator-webapp when I ask generator-spring? generator-spring only requires Yo 1..0.0-rc.1 so it should work.
It's happened to me as well. I have no idea the reason why it is having some issues, even trying to install any dependency by separated.
Anyway, what I have done to solve this after spending some hours installing, reistalling, cleaning caches, googling and so on and so forth was basically updating nodejs.
I am on Linux Mint, then Ubuntu and Debian should be the same or similar.
To sum up,
Install nvm before
nvm ls-remote
nvm install 0.12.0
nvm use 0.12.0
node -v
npm install -g generator-webapp
npm install -g yo bower grunt-cli gulp
I would recommend to use nvm for updating node, you can follow this guide or tutorial
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server#how-to-install-using-nvm
After that, I was able to install yo and its dependencies without any problem.
By the way I chose version node v0.12.0
Hope this help
Related
Showing below error while trying to install appium.
While doing sudo npm install -g appium.
npm ERR! Error: Invalid name: "#gulp-sourcemaps/map-sources"
npm ERR! at ensureValidName (/usr/lib/nodejs/normalize-package-data/lib/fixer.js:284:15)
npm ERR! at Object.module.exports.fixNameField (/usr/lib/nodejs/normalize-package-data/lib/fixer.js:199:5)
npm ERR! at /usr/lib/nodejs/normalize-package-data/lib/normalize.js:29:38
npm ERR! at Array.forEach (native)
npm ERR! at normalize (/usr/lib/nodejs/normalize-package-data/lib/normalize.js:28:15)
npm ERR! at final (/usr/lib/nodejs/read-package-json/read-json.js:310:33)
npm ERR! at then (/usr/lib/nodejs/read-package-json/read-json.js:124:33)
npm ERR! at /usr/lib/nodejs/read-package-json/read-json.js:234:40
npm ERR! at fs.js:268:14
npm ERR! at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.13.0-137-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "appium"
npm ERR! cwd /home/mosheko
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/mosheko/npm-debug.log
npm ERR! not ok code 0
It might be helpful. Steps to get appium working on ubuntu pc:
Install ruby: Paste the below command at terminal and hit enter
sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
Install linux brew:
Paste the below command at terminal and hit enter
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
set path for brew: Type: gedit .bashrc at terminal and copy paste the following into the .bashrc file
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
Install node: Paste the below commands one by one at terminal and hit enter
brew update
brew install node
brew link node
Install Appium:
npm install -g appium npm install wd
To start Appium: Paste the below command at terminal and hit enter
appium
Thanks
Install Java and check the Java version
Step 1 : Java -version
Install Node.js and npm from the Ubuntu repository.
Step 2 : sudo apt update
Step 3 : sudo apt install nodejs
Step 4 : nodejs --version
Out Put : v8.10.0 (version of the Node)
Step 5 : sudo apt install npm
Step 6 : npm --version (npm version).
Step 7 : 3.5.2
Step 8 : sudo npm install -g appium
Step 9 : npm install wd
Step 10 : npm install -g appium-doctor
To verify “Appium” installation we can use appium-doctor. For this, we have to install appium doctor using npm.
Step 11 : appium-doctor
Step 12 : Type “appium” into the terminal and press enter button.
Appium will start.
I'm very beginner on Ruby and Ruby on Rails and i just managed to install RonR my server. My problem is, when i try to install a platform called ShareTribe, although everything went just fine until bunde install , npm install came with this error:
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents#1.0.12
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! /home/srv/rails/sharetribe/client/npm-debug.log
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! # postinstall: `cd client && npm install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # postinstall script 'cd client && npm install'.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd client && npm install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/srv/rails/sharetribe/npm-debug.log`
What i realized is that My os causes that (Darwin aka. Mac OSX is the valid os)
Is my guess right? If yes, is there any way to install the platform on Ubuntu?
If not, how can i correct this error?
Thank you in advance!
You must install all the requirement within the same version
make sure your npm path is registered, you can use the following
export PATH="/Users/{YOUR_USER_NAME}/.npm-packages/bin/:$PATH"
now you can install nvm using the following code
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash
and write the following to load the NVM and set the required version for sharetribe
export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm alias default 7.8.0
Hope this would help
My ios-sim broke recently after installing system updates, and I'm trying to re-install it. Currently, it's not installed in my directory. When running sudo npm install -g ios-sim, I receive this error.
$ sudo npm install -g ios-sim
npm http GET https://registry.npmjs.org/ios-sim
npm http 304 https://registry.npmjs.org/ios-sim
> ios-sim#1.9.0 preinstall /usr/local/lib/node_modules/ios-sim
> rake build
events.js:72
throw er; // Unhandled 'error' event
^
Error: Cannot find module './ios-sim' from '/usr/local/lib/node_modules/ios-sim'
at /usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:36:25
at load (/usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:54:43)
at /usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:60:22
at /usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:16:47
at Object.oncomplete (fs.js:107:15)
npm ERR! ios-sim#1.9.0 preinstall: `rake build`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the ios-sim#1.9.0 preinstall script.
npm ERR! This is most likely a problem with the ios-sim package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rake build
npm ERR! You can get their info via:
npm ERR! npm owner ls ios-sim
npm ERR! There is likely additional logging output above.
I've updated Node.JS to 1.4.3.
Does anyone know why this is happening and how I can fix it?
on my system install using node.js(v0.10.8)
$ sudo npm install -g ios-sim
also failed..
however
$ git clone git://github.com/phonegap/ios-sim.git
$ cd ios-sim
$ sudo rake install prefix=/usr/local
worked fine..
You just need to set your developer active directory:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Then you can install ios-sim as you would normally do: npm install ios-sim -g.
Check your version of Xcode, report it. Do you have Xcode Command-line tools installed also?
If you are on Mavericks:
$ xcode-select --install
When I run
npm install -g yo grunt-cli bower
at my terminal I get the following dependency error:
npm ERR! peerinvalid The package generator-karma does not satisfy its siblings'
peerDependencies requirements!
npm ERR! peerinvalid Peer generator-angular#0.5.0 wants generator-karma#~0.5.0
npm ERR! System Darwin 12.4.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo" "grunt-cli" "bower"
npm ERR! cwd /Users/ryanwieghard/code/angin/indie-cinema-tools
npm ERR! node -v v0.10.20
npm ERR! npm -v 1.3.11
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/ryanwieghard/code/angin/indie-cinema-tools/npm-debug.log
npm ERR! not ok code 0
I am not sure how to resolve this. Is there a way to manually install generator-karma#~0.5.0 ?
The new version of yeoman installs bower and grunt for you (so you don't need those on your npm line anymore). So, just to be safe remove what you have:
npm remove -g yo bower grunt-cli
And then try this install
npm install -g yo
Some people still experience the problem you're having though, here's the issue and in comments are a number of different things to try if the above doesn't resolve your issue: https://github.com/yeoman/generator-angular/issues/220
https://stackoverflow.com/a/24084524/3692197
This helped me.
I uninstalled all the dependent generators which are throwing error
npm uninstall -g generator-[generator-name]
Update Yo
npm update -g yo
Install the required generator
npm install -g generator-[generator-name]
This one helped me:
npm uninstall -g generator-karma && npm install -g generator-angular
Before updating or re-installing yo, you must remove all generators (in my case generator-angular)
npm remove -g generator-angular
Then you can update yeoman
npm update -g yo
And smile :)
I had to do "sudo rm -rf /usr/local/lib/node_modules/generator-karma"
then npm update -g yo
I am trying to integrate Spine with Juggernaut. First I tried to clone fowa branch (https://github.com/maccman/spine.rails3/tree/fowa) but I am not able to clone that branch so I am doing app myself following by maccman/spine.rails3 instead of Pusher I used Juggernaut. For Juggernaut I followed maccman/Juggernaut (https://github.com/maccman/juggernaut/tree/)
I installed the redis server by
sudo apt-get install redis-server
Already I installed npm
spritle#ubuntu:~$ npm -v
1.0.106
For
npm install -g juggernaut
npm ERR! Could not create /usr/local/lib/node_modules/___juggernaut.npm
npm ERR! error installing juggernaut#2.1.0 Error: EACCES, Permission denied '/usr/local/lib/node_modules/___juggernaut.npm'
npm ERR! Error: EACCES, Permission denied '/usr/local/lib/node_modules/___juggernaut.npm'
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.32-21-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "juggernaut"
npm ERR! cwd /home/spritle
npm ERR! node -v v0.5.5-pre
npm ERR! npm -v 1.0.106
npm ERR! path /usr/local/lib/node_modules/___juggernaut.npm
npm ERR! code EACCES
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/spritle/npm-debug.log
npm not ok
I am getting this error
So I did
npm install juggernaut
For this I am getting
juggernaut#2.1.0 ./node_modules/juggernaut
├── redis#0.6.6
├── node-static-maccman#0.5.3
├── optimist#0.2.8 (wordwrap#0.0.2)
└── socket.io#0.8.6
After that I did
gem install juggernaut
For
spritle#ubuntu:~$ sudo /etc/init.d/redis-server start
I am getting
Starting redis-server: redis-server.
For
spritle#ubuntu:~$ juggernaut
I am getting
juggernaut: command not found
So for http://localhost:8080
I am getting
Unable to connect error
I installed the redis and juggernaut. When i run localhost:8080 I am getting error.
I don't know what i did wrong. Anyone can help me.
I am an idiot i want to start the juggernaut server at where i was installed. Instead of that i started the setver in other place. Now i can able to connect to juggernaut. I can access http://localhost:8080. Now i started juggernaut at
spritle#ubuntu:/usr/local/lib/node_modules/juggernaut$ juggernaut server.js