node.js - Ubuntu + Ember 不工作

标签 node.js ubuntu ember.js ubuntu-14.04 ember-cli

我安装了 Node 0.12.0,我使用 NVM 安装了它。
我安装了 ember-cli,我使用 npm 安装了它:
我通过以下方式安装它:
sudo npm install -g ember-cli

但是现在,当我尝试在一个全新的 ember 项目上运行 ember 服务器时,它让我得到了 100 个模块,我已经做了大约半个小时,并使用 npm 手动安装每个模块。他们是更好的方法吗,因为这是一种痛苦?

同样,我似乎无法获得 Node/调试模块,所以我有点卡住了。

arie@arie-UX32VD:~/Desktop/programming/git/bostonember/ember$ sudo npm install debug/node
npm ERR! git clone git@github.com:debug/node Cloning into bare repository '/home/arie/.npm/_git-remotes/git-github-com-debug-node-65a3e6d9'...
npm ERR! git clone git@github.com:debug/node Permission denied (publickey).
npm ERR! git clone git@github.com:debug/node fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:debug/node 
npm ERR! git clone git@github.com:debug/node Please make sure you have the correct access rights
npm ERR! git clone git@github.com:debug/node and the repository exists.
npm ERR! addLocal Could not install debug/node
npm ERR! Error: ENOENT, stat 'debug/node'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.16.0-34-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "debug/node"
npm ERR! cwd /home/arie/Desktop/programming/git/bostonember/ember
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! path debug/node
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/arie/Desktop/programming/git/bostonember/ember/npm-debug.log
npm ERR! not ok code 0

最佳答案

您会感到困惑,因为您的系统中有多个版本的 Node。您是通过 nvm 安装的并且可能您还通过 apt-get 安装了 Node , 后者是询问 sudo权限,nvm永远不会那样做。

sudo apt-get remove node

从系统中完全删除 Node ,只使用 nvm 安装的二进制文件.您可以通过以下方式验证您使用的是正确的二进制文件:
which node

预期输出:
~/.nvm/v0.12.00/bin/node

关于node.js - Ubuntu + Ember 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29778992/

相关文章:

node.js - 为什么sendFile方法显示源代码而不是html页面

node.js - 如何在nodejs中为HTTPS使用外部证书

ubuntu - 哟: command not found

javascript - 当它依赖于另一个模型时创建模型

ember.js - 使用 hasMany 关系对模型执行回滚

javascript - 使用node.js通过cookie发布数据

node.js - `lab` 和 `code` 与 `mocha` 和 `chai` nodejs 库之间的比较

ubuntu - 使用 venv 在 WSL 中安装 Python 要求时出现问题

git - 如何在 Ubuntu 上安装 QtWebEngine

ember.js - Ember JS 访问 ember 对象属性的首选方式