我是一个尝试探索 Yeoman 的菜鸟,但即使只是让事情运行起来,我也会遇到问题。我认为随着时间的推移,在探索了 Node.js、Bower、Grunt 以及对我的终端进行了大体上的处理之后,我已经完全把事情搞砸了。我不确定此时如何获得一个干净的名单或最好的前进方式。我已经尝试完全卸载节点并重新开始,但正如我所说,它并不是一个完全干净的石板。
无论如何,这就是我现在所处的位置:
$ node -v
v0.10.21
$ npm -v
1.3.11
$ npm install -g yo generator-generator
npm http GET https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/generator-generator
npm http 304 https://registry.npmjs.org/generator-generator
npm http 304 https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/yeoman-generator
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/update-notifier
npm http GET https://registry.npmjs.org/insight
npm http GET https://registry.npmjs.org/sudo-block
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/open/0.0.4
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/github
npm http GET https://registry.npmjs.org/yeoman-generator
npm http 304 https://registry.npmjs.org/yeoman-generator
npm http 304 https://registry.npmjs.org/insight
npm http 304 https://registry.npmjs.org/update-notifier
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/sudo-block
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/open/0.0.4
npm http 304 https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/github
npm http 304 https://registry.npmjs.org/yeoman-generator
npm http GET https://registry.npmjs.org/has-color
npm http GET https://registry.npmjs.org/ansi-styles
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/configstore
npm http GET https://registry.npmjs.org/inquirer
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/ansi-styles
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/diff
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/isbinaryfile
npm http GET https://registry.npmjs.org/dargs
npm http GET https://registry.npmjs.org/inquirer
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/shelljs
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/text-table
npm http GET https://registry.npmjs.org/cheerio
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/ansi-styles
npm http 304 https://registry.npmjs.org/has-color
npm http 304 https://registry.npmjs.org/configstore
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/inquirer
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/ansi-styles
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/diff
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/js-yaml
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/isbinaryfile
npm http 304 https://registry.npmjs.org/dargs
npm http 304 https://registry.npmjs.org/inquirer
npm http 304 https://registry.npmjs.org/iconv-lite
npm http 304 https://registry.npmjs.org/text-table
npm http 304 https://registry.npmjs.org/findup-sync
npm http 304 https://registry.npmjs.org/shelljs
npm http GET https://registry.npmjs.org/cli-color
npm http GET https://registry.npmjs.org/mute-stream/0.0.3
npm http 304 https://registry.npmjs.org/cheerio
npm http 304 https://registry.npmjs.org/osenv/0.0.3
npm http 304 https://registry.npmjs.org/js-yaml
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/mute-stream/0.0.3
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/cli-color
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/block-stream
npm http GET https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/entities
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/cheerio-select
npm http GET https://registry.npmjs.org/htmlparser2/3.1.4
npm http GET https://registry.npmjs.org/esprima
npm http GET https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/es5-ext
npm http GET https://registry.npmjs.org/memoizee
npm http GET https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/block-stream
npm http 304 https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/htmlparser2/3.1.4
npm http 304 https://registry.npmjs.org/esprima
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/entities
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/cheerio-select
npm http 304 https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/es5-ext
npm http 304 https://registry.npmjs.org/memoizee
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/CSSselect
npm http 304 https://registry.npmjs.org/CSSselect
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/CSSwhat
npm http GET https://registry.npmjs.org/domutils
npm http GET https://registry.npmjs.org/event-emitter
npm http GET https://registry.npmjs.org/next-tick
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/CSSwhat
npm http GET https://registry.npmjs.org/domelementtype
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/domhandler
npm http GET https://registry.npmjs.org/domutils
npm http 304 https://registry.npmjs.org/domutils
npm http 304 https://registry.npmjs.org/event-emitter
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/domelementtype
npm http 304 https://registry.npmjs.org/next-tick
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/domhandler
npm http 304 https://registry.npmjs.org/domutils
/Users/skube/.node/bin/yo -> /Users/skube/.node/lib/node_modules/yo/bin/yo
yo@1.0.4 /Users/skube/.node/lib/node_modules/yo
├── open@0.0.4
├── async@0.2.9
├── chalk@0.2.1 (has-color@0.1.1, ansi-styles@0.2.0)
├── lodash@1.3.1
├── nopt@2.1.2 (abbrev@1.0.4)
├── sudo-block@0.2.1 (chalk@0.1.1)
├── insight@0.2.0 (inquirer@0.2.5, request@2.27.0, configstore@0.1.5)
├── update-notifier@0.1.7 (semver@2.1.0, request@2.27.0, configstore@0.1.5)
└── yeoman-generator@0.13.4 (dargs@0.1.0, diff@1.0.7, debug@0.7.2, text-table@0.1.1, mime@1.2.11, isbinaryfile@0.1.9, rimraf@2.2.2, mkdirp@0.3.5, shelljs@0.1.4, glob@3.2.6, tar@0.1.18, underscore.string@2.3.3, iconv-lite@0.2.11, findup-sync@0.1.2, cheerio@0.12.3, request@2.25.0, inquirer@0.3.4)
generator-generator@0.3.0 /Users/skube/.node/lib/node_modules/generator-generator
├── github@0.1.12
└── yeoman-generator@0.13.4 (chalk@0.2.1, dargs@0.1.0, async@0.2.9, diff@1.0.7, debug@0.7.2, text-table@0.1.1, mime@1.2.11, isbinaryfile@0.1.9, rimraf@2.2.2, mkdirp@0.3.5, glob@3.2.6, tar@0.1.18, shelljs@0.1.4, findup-sync@0.1.2, lodash@1.3.1, underscore.string@2.3.3, iconv-lite@0.2.11, cheerio@0.12.3, request@2.25.0, inquirer@0.3.4)
我的 $PATH:
$ echo $PATH
/usr/local/share/npm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
但是当我尝试运行 Yeoman
$ yo
-bash: yo: command not found