【问题标题】:Having errors in installing yeoman安装 yeoman 时出错
【发布时间】:2016-11-27 20:55:43
【问题描述】:

有这个错误.. 我已经使用 brew 安装了节点。 尝试设置一个角度项目,但通过运行命令依赖项文件夹没有被创建并给出这个错误。

- node-libs-browser node_modules/webpack/node_modules/node-libs-browser
- watchpack node_modules/webpack/node_modules/watchpack
- chokidar node_modules/webpack/node_modules/watchpack/node_modules/chokidar
npm ERR! Darwin 14.1.0
npm ERR! argv "/usr/local/Cellar/node/6.3.1/bin/node" "/usr/local/bin/npm" "install" "--save-dev" "webpack@^1.4.0"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! path /Users/temp/Desktop/node_modules/webpack
npm ERR! code ENOTEMPTY
npm ERR! errno -66
npm ERR! syscall rename

npm ERR! ENOTEMPTY: directory not empty, rename '/Users/temp/Desktop/node_modules/webpack' -> '/Users/temp/Desktop/node_modules/.webpack.DELETE'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/temp/Desktop/faltu/npm-debug.log

如何解决?

【问题讨论】:

  • 你尝试过什么?哪个命令给出?
  • 我正在尝试运行一个简单的项目,该项目由喷泉 webapp 的 yeoman 生成器提供。所以我尝试了 yo -v 。我有一些选项,比如我需要的,例如 sass/css、angular1、angular2 等。在所有这些步骤之后,我遇到了这个错误,并且没有正在创建的文件夹

标签: angularjs npm homebrew yeoman yeoman-generator-angular


【解决方案1】:

安装 Yeoman 的推荐步骤:

  1. 下载并安装node.js:https://nodejs.org
  2. 使用 npm 安装 Yeoman 组件:$ npm install -g yo grunt-cli bower

参考:http://www.slideshare.net/inarocket/learn-yeoman-getting-started(幻灯片 7-9)。

【讨论】:

  • 虽然此链接可能会回答问题,但最好在此处包含答案的基本部分并提供链接以供参考。如果链接页面发生更改,仅链接答案可能会失效。 - From Review
  • 谢谢你,托马斯。我将立即编辑我的答案,并从现在开始遵循您的建议。非常感谢。
【解决方案2】:

项目设置(yeoman gulp Angular)

安装节点(https://nodejs.org/en/

Update npm

npm install npm -g

安装 yo、gulp 和 bower

npm install -g yo

npm install -g gulp

npm install -g bower

安装生成器-gulp-angular

npm install -g generator-gulp-angular

创建一个新的项目文件夹并在该文件夹中打开命令行或终端。 运行 yo 生成器以创建项目结构并回答以下问题

yo gulp-angular [app-name]

【讨论】:

    猜你喜欢
    • 2014-03-06
    • 2016-06-19
    • 2013-09-13
    • 1970-01-01
    • 2016-09-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多