Reputation: 1
I have the following problem when trying to build something with yeoman:
-bash: yo: command not found
What i have done so far:
I installed Node.js and then with npm i installed yeoman (npm install -g yo / with and without sudo)
I edited my .bash_profile and added the Exportpath.
I symlinked a lot (found answers in stackoverflow)
Yo worked but i wasnt able to install more generators than the first i added - and this was not completing the job reporting some errors. Later i discovered that something went wrong installing them global or not because i could see them in the system - but only in the global folder - whatever) so i decided to do all from scratch. So i removed Node.js and did all i could find here to remove node.js, bower, grunt and yo. And the symlinks and the bash-profile etc. Then i reinstalled it all and now... nothing works no more.
my aim is now to get rid of all that and get it working from scratch.
what do u need to help me doing this?
I start by providing the following informations (tell me if you need more!)
echo $NODE_PATH
--> returns nothing
sudo npm install -g yo
--> returns the following summary:
/Users/myuser/npm/bin/yo -> /Users/myuser/npm/lib/node_modules/yo/cli.js
[email protected] postinstall /Users/myuser/npm/lib/node_modules/yo
node ./scripts/doctor
`[Yeoman Doctor] Everything looks alright!
[email protected] /Users/myuser/npm/lib/node_modules/yo
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected],
[email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected],
[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) `
npm-debug.log contains this
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'link' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 verbose linkPkg /Users/myuser
6 error Error: ENOENT, open '/Users/myuser/package.json'
7 error If you need help, you may report this *entire* log,
7 error including the npm and node versions, at:
7 error <http://github.com/npm/npm/issues>
8 error System Darwin 13.1.0
9 error command "node" "/usr/local/bin/npm" "link"
10 error cwd /Users/myuser
11 error node -v v0.10.26
12 error npm -v 1.4.3
13 error path /Users/myuser/package.json
14 error code ENOENT
15 error errno 34
16 verbose exit [ 34, true ]
/Users/myuser/.npmrc has this in it:
prefix = /Users/myuser/npm/
What else do you need to help me?
Last info: im on MacOsx 10.9 (mavericks)
Upvotes: 0
Views: 3090
Reputation: 1052
You have some misconceptions here:
As you installed the yo to your local $HOME/npm
dir, you have to append $HOME/npm/node_modules/bin directory to your $PATH variable and hash -r
You can now install the module with npm install -g yo
(i omitted sudo as this isnt neccessary in your $HOME, it already belongs to you)
Now you have the yo-binary in $PATH, you can execute it easily
For an even easier installation, I suggest you use nvm (https://github.com/creationix/nvm#install-script). It allows for seamless integration of node to your $HOME dir with all prefixes set correctly.
I hope that helps :)
Upvotes: 0