无法安装Ember.js

时间:2015-08-05 12:32:42

标签: ember.js ember-cli

我正在尝试安装Ember CLI但是我收到了错误,我无法得到我需要做的事情。

我正在运行以下命令在我的C盘中安装Ember CLI:

npm install -g ember-cli

我收到以下错误:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ember-cli"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ember-cli"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2
npm ERR! path C:\npm-debug.log.9900b075918cf81d21ff4fa7a56e3bc6
npm ERR! code EPERM
npm ERR! errno -4048

npm ERR! Error: EPERM, open 'C:\npm-debug.log.9900b075918cf81d21ff4fa7a56e3bc6'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM, open 'C:\npm-debug.log.9900b075918cf81d21ff4fa7a56e3bc6']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   path: 'C:\\npm-debug.log.9900b075918cf81d21ff4fa7a56e3bc6' }
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!     C:\npm-debug.log

更新:

    C:\>npm install -g ember-cli
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ember-cli"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     C:\npm-debug.log

2 个答案:

答案 0 :(得分:0)

我已经解决了这个问题。这主要是因为网络问题。我已经启用了节点用于下载文件的代理。

答案 1 :(得分:-1)

这种情况正在发生,因为要使用npm全局安装某些内容,您必须是root用户或管理员。在窗口中右键单击终端应用程序,然后单击以管理员身份运行选项。在Mac和Linux上,您只需将sudo放在命令

之前