致命错误:无法找到当地的咕噜声。甚至在对bash_profile进行更改之后

时间:2014-03-23 20:50:42

标签: node.js gruntjs mean-stack mean.io

我已经关注了其他帖子的几个答案,但我仍然遇到同样的错误。我正在为我的项目使用mean.io框架,我应该在终端中使用命令grunt来运行我的服务器。

grunt -version:

grunt-cli v0.1.13

.bash_profile:

ESC="\033" # This is the escape sequence
NO_COLOR="$ESC[0m"
IRED="$ESC[1;31m" # ANSI color code for intense/bold red
IGRN="$ESC[1;32m" # ANSI color code for intense/bold green

# From http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/
# I had to change 'git-symbolic-ref' to 'git symbolic-ref'
function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo " ["${ref#refs/heads/}"]" # I wanted my branch wrapped in [], use () or <> or whatever
}

# from http://ariejan.net/2010/04/25/ruby-version-and-gemset-in-your-bash-prompt-yes-sir
function rvm_version {
  local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
  [ "$gemset" != "" ] && gemset="@$gemset"
  local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}')
  [ "$version" != "" ] && version="$version"
  local full="$version$gemset"
  [ "$full" != "" ] && echo "${full}:" # the colon at the end is a delimiter, you could use a space instead
}

#PS1="\h:\W \u\$" # For reference, here's the default OS X prompt
#export PS1="\$(rvm_version)\W \$(parse_git_branch)\$ " # Without the colors

# I had to put the \[ and \] down here, as opposed to $IRED, to avoid wrapping funkiness.
export PS1="\[$IRED\]\$(rvm_version)\[$NO_COLOR\]\W\[$IGRN\]\$(parse_git_branch)\[$NO_COLOR\] \$ "

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export PATH=/usr/local/share/npm/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@railstuorial_rails_4_0/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/kelvinyu/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/kelvinyu/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
export PATH=/usr/local/share/npm/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@railstuorial_rails_4_0/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/kelvinyu/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/kelvinyu/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
export PATH=/usr/local/share/npm/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@railstuorial_rails_4_0/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/kelvinyu/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/kelvinyu/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
export PATH=/usr/local/share/npm/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@railstuorial_rails_4_0/bin:/Users/kelvinyu/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/kelvinyu/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/kelvinyu/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin

export PATH=/usr/local/Cellar/node/0.10.24/bin/:$PATH
export PATH=/usr/local/lib/node_modules/grunt/bin:$PATH

任何帮助都会非常感激,因为我需要服务器来测试我的路由和控制器。如果需要更多信息,请告诉我。

运行npm install时出错:

npm http GET https://registry.npmjs.org/grunt-contrib-watch
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
npm http GET https://registry.npmjs.org/grunt-concurrent
npm http GET https://registry.npmjs.org/grunt-mocha-test
npm http 304 https://registry.npmjs.org/grunt-contrib-jshint
npm http 304 https://registry.npmjs.org/grunt-concurrent
npm http 304 https://registry.npmjs.org/grunt-contrib-watch
npm http 304 https://registry.npmjs.org/grunt-mocha-test

> mean@0.1.2 postinstall /Users/kelvinyu/fullstack/pleasetakeit
> node node_modules/bower/bin/bower install

bower                       EMALFORMED Failed to read /Users/kelvinyu/fullstack/pleasetakeit/bower.json

Additional error details:
Unexpected token }

npm ERR! mean@0.1.2 postinstall: `node node_modules/bower/bin/bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mean@0.1.2 postinstall script.
npm ERR! This is most likely a problem with the mean package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/bower/bin/bower install
npm ERR! You can get their info via:
npm ERR!     npm owner ls mean
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/Cellar/node/0.10.24/bin/npm" "install"
npm ERR! cwd /Users/kelvinyu/fullstack/pleasetakeit
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/kelvinyu/fullstack/pleasetakeit/npm-debug.log
npm ERR! not ok code 0

0 个答案:

没有答案