1

'cake'コマンドを使用しようとすると、常にこのエラーが発生します。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

これにより、cakecoffescript シェル コマンドよりも cakephp シェル コマンドが優先されます。

乾杯!

于 2012-09-27T23:53:45.693 に答える