phoenix新建项目依赖安装阶段报错

Error during dependency install phase of phoenix new project creation

我正在尝试遵循 Phoenix 框架的 Up and Running 指南。我使用的是Windows 8.1,以下是软件版本:

当我 运行 命令 mix phoenix.new hello_phoenix 时,在创建应用程序期间对 YFetch and install dependencies? [Yn] y 之后,我注意到控制台中出现以下错误(也可以在npm-debug.log)

...
npm http GET https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz
npm http 200 https://registry.npmjs.org/uid2/-/uid2-0.0.2.tgz
npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz
npm http 200 https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz

[eval]:1
"require('fs').readdir('lib',function(e){e&&require('child_process').exec('npm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected token ILLEGAL
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:532:25)
    at startup (node.js:80:7)
    at node.js:901:3
npm ERR! weird error 8
npm ERR! Error: ENOENT, lstat 'C:\Users\srikps\AppData\Local\Temp\npm-1297637663559041-0.8095405038911849\package\src\libsass\subset_map.hpp'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd E:\elixir\hello_phoenix
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! path C:\Users\srikps\AppData\Local\Temp\npm-1297637663559041-0.8095405038911849\package\src\libsass\subset_map.hpp
npm ERR! fstream_path C:\Users\srikps\AppData\Local\Temp\npm-1297637663559041-0.8095405038911849\package\src\libsass\subset_map.hpp
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http GET https://registry.npmjs.org/os-homedir
npm http GET https://registry.npmjs.org/os-tmpdir
npm http GET https://registry.npmjs.org/xtend
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/is-finite
npm http GET https://registry.npmjs.org/leven
npm http GET https://registry.npmjs.org/get-stdin

如果我尝试 运行 应用程序,使用命令 mix phoenix.server,我看到以下错误

E:\elixir\hello_phoenix>mix phoenix.server
[info] Running HelloPhoenix.Endpoint with Cowboy on port 4000 (http)

module.js:340
    throw err;
          ^
Error: Cannot find module 'e:\elixir\hello_phoenix\node_modules\brunch\bin\brunch'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3

如果我访问 http://localhost:4000, the page does not look like as it should look like,它看起来像这样:

我也尝试运行宁Phoenix Issue Page

中提到的命令
rm -rf node_modules
npm cache clean
npm install

然而,我得到另一个错误:

...
npm http 200 https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.1.tgz
npm http 200 https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz

> brunch@1.8.3 postinstall E:\elixir\hello_phoenix\node_modules\brunch
> node -e "require('fs').readdir('lib',function(e){e&&require('child_process').exec('npm run prepublish')})"


[eval]:1
"require('fs').readdir('lib',function(e){e&&require('child_process').exec('npm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected token ILLEGAL
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:532:25)
    at startup (node.js:80:7)
    at node.js:901:3
unbuild brunch@1.8.3
npm http 200 https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz
npm http 200 https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz
npm http 200 https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz
...

我相信 Phoenix 至少需要 node.js 版本 0.12.0.