1

当我尝试使用“蛋糕”命令时,我总是收到此错误。它似乎与 CoffeeScript 冲突。

/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:108
throw new Error("Cakefile not found in " + (process.cwd()));
      ^
Error: Cakefile not found in /Users/kevingorjan/e-Merce/Learning/CakePHP/Blog_demo/lib/Cake/Console
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:108:11
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14
at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:106:14

我怎样才能解决这个问题?

4

1 回答 1

3

$ vi .bash_profile

我的路径中有节点和咖啡脚本以及各种各样的东西。我的 .bash_profile 中有以下几行:

#Path
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/share/npm/bin:$PATH"

当我像他们建议的那样将蛋糕的东西添加到我的路径时http://book.cakephp.org/2.0/en/console-and-shells.html#adding-cake-to-your-path我得到了同样的错误你拿到:

#Path
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/share/npm/bin:$PATH"

export PATH="$PATH:/Users/eO_Ae/cakephp/lib/Cake/Console"

我所做的修复它是:

# Cake PHP
PATH="/Users/eO_Ae/cakephp/lib/Cake/Console:$PATH"

# Path
PATH="$PATH:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/share/npm/bin"

export PATH

这使 cakephp cakeshell 命令优先于 coffescript 之一。

干杯!

于 2012-09-27T23:53:45.693 回答