错误命令无法执行... npm install

时间:2016-09-01 11:44:11

标签: npm phoenix-framework

我跟着http://www.phoenixframework.org/docs/installation在现有的Debian系统上安装了Phoenix,但无法让它工作。当我想创建一个新的Phoenix应用程序时,我收到以下错误:

<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.4/fabric.min.js"></script>
<canvas id="c" width="400" height="300"></canvas>

如果我然后运行abc@xyz:~$ mix phoenix.new test10 * creating test10/config/config.exs [...] * creating test10/web/views/page_view.ex Fetch and install dependencies? [Yn] Y * running npm install && node node_modules/brunch/bin/brunch build * error command failed to execute, please run the following command again after installation: "npm install && node node_modules/brunch/bin/brunch build" [...] 我得到了这个:

npm install

我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:2)

运行mix deps.get可以解决问题:

abc@xyz:~/test10$ mix deps.get
Could not find Hex, which is needed to build dependency :phoenix
Shall I install Hex? (if running non-interactively, use: "mix local.hex --force") [Yn] Y
* creating /home/abc/.mix/archives/hex-0.13.0
Running dependency resolution
Dependency resolution completed
  connection: 1.0.4
[...]