Install the Yeoman toolset
参照:http://yeoman.io/codelab/setup.html
1:$npm install --global yo bower grunt-cli
提示以下错误
npm ERR! tar.unpack untar error /home/y/.npm/grunt-cli/0.1./package.tgz
npm ERR! tar.unpack untar error /home/y/.npm/yo/1.4./package.tgz
npm ERR! tar.unpack untar error /home/y/.npm/bower/1.4./package.tgz
npm ERR! Linux 3.13.--generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--global" "yo" "bower" "grunt-cli"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! path /usr/local/lib/node_modules/grunt-cli
npm ERR! code EACCES
npm ERR! errno - npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/grunt-cli'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/grunt-cli']
npm ERR! errno: -,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/grunt-cli',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/grunt-cli',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:95:15)' ] }
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/y/npm-debug.log
解决方法参照:https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
(1)mkdir "${HOME}/.npm-packages"
(2).bashrc
NPM_PACKAGES="${HOME}/.npm-packages"
NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
PATH="$NPM_PACKAGES/bin:$PATH"
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
(3)$HOME/.npmrc
prefix=${HOME}/.npm-packages
2:再次安装:y@y:~$ npm install --global yo bower grunt-cli
提示:npm WARN optional dep failed, continuing uglify-js@~2.3
解决方法:y@y:~$sudo npm cache clean
3:查看npm配置信息
y@y:~$ npm config get prefix
/home/y/.npm-packages
进行安装:y@y:~$ npm install --global yo bower grunt-cli
/home/y/.npm-packages/bin/grunt -> /home/y/.npm-packages/lib/node_modules/grunt-cli/bin/grunt
/home/y/.npm-packages/bin/yo -> /home/y/.npm-packages/lib/node_modules/yo/lib/cli.js > yo@1.4. postinstall /home/y/.npm-packages/lib/node_modules/yo
> yodoctor -
Yeoman Doctor
Running sanity checks on your system ✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory Everything looks all right!
/home/y/.npm-packages/bin/bower -> /home/y/.npm-packages/lib/node_modules/bower/bin/bower
grunt-cli@0.1. /home/y/.npm-packages/lib/node_modules/grunt-cli
├── resolve@0.3.
├── nopt@1.0. (abbrev@1.0.)
└── findup-sync@0.1. (lodash@2.4., glob@3.2.) yo@1.4. /home/y/.npm-packages/lib/node_modules/yo
├── titleize@1.0.
├── array-uniq@1.0.
├── figures@1.3.
├── user-home@1.1.
├── opn@1.0.
├── async@0.9.
├── cross-spawn@0.2. (lru-cache@2.6.)
├── lodash@3.8.
├── yeoman-character@1.0. (supports-color@1.3.)
├── string-length@1.0. (strip-ansi@2.0.)
├── humanize-string@1.0. (decamelize@1.0.)
├── sort-on@1.2. (dot-prop@2.0.)
├── findup@0.1. (commander@2.1., colors@0.6.)
├── chalk@1.0. (escape-string-regexp@1.0., ansi-styles@2.0., supports-color@1.3., strip-ansi@2.0., has-ansi@1.0.)
├── update-notifier@0.3. (is-npm@1.0., latest-version@1.0., semver-diff@2.0.)
├── got@2.9. (object-assign@2.0., lowercase-keys@1.0., is-stream@1.0., timed-out@2.0., prepend-http@1.0., nested-error-stacks@1.0., statuses@1.2., infinity-agent@2.0., read-all-stream@2.1., duplexify@3.3.)
├── root-check@1.0. (downgrade-root@1.1., sudo-block@1.2.)
├── npm-keyword@1.1. (registry-url@3.0.)
├── package-json@1.1. (registry-url@3.0.)
├── fullname@1.1. (npmconf@2.1.)
├── yosay@1.0. (ansi-regex@1.1., ansi-styles@2.0., strip-ansi@2.0., word-wrap@1.0., pad-component@0.0., taketalk@1.0., minimist@1.1.)
├── configstore@0.3. (object-assign@2.0., xdg-basedir@1.0., osenv@0.1., graceful-fs@3.0., uuid@2.0., mkdirp@0.5., js-yaml@3.3.)
├── yeoman-environment@1.2. (escape-string-regexp@1.0., log-symbols@1.0., untildify@2.0., diff@1.4., text-table@0.2., debug@2.1., globby@1.2., grouped-queue@0.3., mem-fs@1.1.)
├── meow@3.1. (object-assign@2.0., minimist@1.1., camelcase-keys@1.0., indent-string@1.2.)
├── yeoman-doctor@1.3. (object-values@1.0., log-symbols@1.0., each-async@1.1., twig@0.7.)
├── insight@0.5. (object-assign@2.0., lodash.debounce@3.0., tough-cookie@0.12., os-name@1.0., request@2.55.)
└── inquirer@0.8. (ansi-regex@1.1., cli-width@1.0., through@2.3., readline2@0.1., rx@2.5.) bower@1.4. /home/y/.npm-packages/lib/node_modules/bower
├── is-root@1.0.
├── junk@1.0.
├── stringify-object@1.0.
├── abbrev@1.0.
├── user-home@1.1.
├── which@1.0.
├── chmodr@0.1.
├── rimraf@2.3.
├── archy@1.0.
├── opn@1.0.
├── bower-logger@0.2.
├── bower-endpoint-parser@0.2.
├── graceful-fs@3.0.
├── lockfile@1.0.
├── lru-cache@2.6.
├── nopt@3.0.
├── retry@0.6.
├── tmp@0.0.
├── q@1.3.
├── semver@2.3.
├── fstream@1.0. (inherits@2.0.)
├── mout@0.11.
├── p-throttler@0.1. (q@0.9.)
├── request-progress@0.3. (throttleit@0.0.)
├── bower-json@0.4. (intersect@0.0., deep-extend@0.2., graceful-fs@2.0.)
├── shell-quote@1.4. (array-filter@0.0., array-reduce@0.0., array-map@0.0., jsonify@0.0.)
├── promptly@0.2. (read@1.0.)
├── chalk@1.0. (escape-string-regexp@1.0., ansi-styles@2.0., supports-color@1.3., strip-ansi@2.0., has-ansi@1.0.)
├── github@0.2. (mime@1.3.)
├── fstream-ignore@1.0. (inherits@2.0., minimatch@2.0.)
├── glob@4.5. (inherits@2.0., inflight@1.0., once@1.3., minimatch@2.0.)
├── tar-fs@1.5. (pump@1.0., tar-stream@1.1.)
├── decompress-zip@0.1. (mkpath@0.1., touch@0.0., readable-stream@1.1., binary@0.3.)
├── mkdirp@0.5. (minimist@0.0.)
├── bower-config@0.6. (osenv@0.0., graceful-fs@2.0., mout@0.9., optimist@0.6.)
├── update-notifier@0.3. (is-npm@1.0., string-length@1.0., semver-diff@2.0., latest-version@1.0.)
├── insight@0.5. (object-assign@2.0., async@0.9., lodash.debounce@3.0., tough-cookie@0.12., os-name@1.0.)
├── cardinal@0.4. (ansicolors@0.2., redeyed@0.4.)
├── request@2.53. (caseless@0.9., json-stringify-safe@5.0., aws-sign2@0.5., forever-agent@0.5., stringstream@0.0., oauth-sign@0.6., tunnel-agent@0.4., isstream@0.1., node-uuid@1.4., qs@2.3., form-data@0.2., bl@0.9., tough-cookie@1.1., combined-stream@0.0., mime-types@2.0., http-signature@0.10., hawk@2.3.)
├── bower-registry-client@0.3. (graceful-fs@2.0., request-replay@0.2., rimraf@2.2., lru-cache@2.3., async@0.2., mkdirp@0.3., request@2.51.)
├── handlebars@2.0. (optimist@0.3., uglify-js@2.3.)
├── configstore@0.3. (object-assign@2.0., xdg-basedir@1.0., osenv@0.1., uuid@2.0., js-yaml@3.3.)
└── inquirer@0.8. (figures@1.3., ansi-regex@1.1., mute-stream@0.0., through@2.3., lodash@2.4., readline2@0.1., rx@2.5., chalk@0.5., cli-color@0.3.)
4:检查是否安装成功
y@y:~$ yo --version && bower --version && grunt --version
1.4.
1.4.
grunt-cli v0.1.13
Install the Yeoman toolset的更多相关文章
- Try out the latest C++ compiler toolset without waiting for the next update of Visual Studio
Updated 22/Apr/2016: The NuGet package is now being uploaded daily. The payload doesn’t change every ...
- 好文推荐系列---------(4)使用Yeoman自动构建Ember项目
好文原文地址:http://segmentfault.com/a/1190000000368881 我决定学习前端开发的效率工具Yeoman.本文将首先介绍Yeoman的基本情况,接着我们会使用Yeo ...
- DotNet 资源大全中文版(Awesome最新版)
Awesome系列的.Net资源整理.awesome-dotnet是由quozd发起和维护.内容包括:编译器.压缩.应用框架.应用模板.加密.数据库.反编译.IDE.日志.风格指南等. 算法与数据结构 ...
- 阿里云centos 安装 nodejs npm express
yum check-update yum install vsftpdvi /etc/vsftpd/vsftpd.conf anonymous_enable=NO service vsftpd sta ...
- npm 安装与常用命令
下载nodejs并安装,会附带安装npm工具https://nodejs.org/en/download/ npm 常用命令#在执行命令时需要管理员权限,mac请用sudo来执行,windows请使用 ...
- Solve Error: node postinstall sh: node: command not found
When install the yeoman using the following command: npm install -g yo You might have the following ...
- boost 1.67编译VS2017版本
最近想系统学习并使用一下boost的asio异步网络库,所以需要编译boost库使用,下面简单介绍如何编译. 编译环境 boost1.67版本,windows 10,VS2017 下载boost 建议 ...
- 【资源大全】.NET资源大全中文版(Awesome最新版)
算法与数据结构(Algorithms and Data structures) 应用程序接口(API) 应用程序框架(Application Frameworks) 模板引擎(Application ...
- Yeoman 官网教学案例:使用 Yeoman 构建 WebApp
STEP 1:设置开发环境 与yeoman的所有交互都是通过命令行.Mac系统使用terminal.app,Linux系统使用shell,windows系统可以使用cmder/PowerShell/c ...
随机推荐
- 《Linear Algebra and Its Applications》-chaper1-向量方程、矩阵方程和线性方程组
向量: 向量的基本运算:向量的运算最基本的一件事情,就是基于它n个分量上进行,即对于两个分量的向量a = <a1,a2>,b = <b1,b2>,有a + b = <a1 ...
- unity3D基础学习 通过判断鼠标点击的是否是目标物体,物体旋转,滑动滚轮缩放拉近视角
贴代码: 摄像机的拉近视角代码: public Transform target; public float minFov = 15f; public float maxFov = 7 ...
- 【基础练习】【vector】codevs3393 序列倒置
版权信息 转载请注明出处 [ametake版权全部]http://blog.csdn.net/ametake欢迎来看 题目非常easy,本质还是练习一下vector 题目描写叙述 Descriptio ...
- Android Studio中解决Gradle DSL method not found: 'android()'
近期导入as的项目出了这种问题 这个问题困扰了我非常长时间,好吧,搜了半天全都是runProguard的.最后在stackoverflow上搜到解决的方法了: http://stackoverflow ...
- Robotium -- 针对apk包的测试
在使用Robotium测试的时候,有时候,测试人员并没有代码权限,而Robotium也可以在只有apk文件进行测试,下面就介绍一下这个过程. 1.设置环境变量 安装jdk环境和sdk环境 2.安装签名 ...
- myeclipse快捷键收集整理
Ctrl+1 快速修复(最经典的快捷键,就不用多说了) Ctrl+D: 删除当前行 Ctrl+Alt+↓ 复制当前行到下一行(复制增加) Ctrl+Alt+↑ 复制当前行到上一行(复制增加) Alt ...
- Linux磁盘设备文件(sda,sdb,sdc…)变化问题
在Linux下往往会碰到这样的问题,磁盘的设备文件,比如/dev/sda, sdb, sdc等等在某些情况下会混乱掉,比如sda变成了sdb或者sdc变成了sdb等等,这样无形中会导致磁盘设备管理的混 ...
- 使用Xmanager工具连接Linux服务器
测试环境:RHEL5.8 1.# vi /usr/share/gdm/defaults.conf --修改以下三项Enable=true DisplaysPerHost=10 Port=177 All ...
- asp.net设置元素css的属性
controls.style.Add("css名称","css值") 添加class规则 control.cssclass="str_cssname& ...
- css基础回顾-定位:position
w3school 对position定义和说明是: 定义和用法: position 属性规定元素的定位类型. 说明: 这个属性定义建立元素布局所用的定位机制.任何元素都可以定位,不过绝对或固定元素会生 ...