Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bowerrc post install hook not working

According to this post bower should be able to run a postinstall script in versions 1.3.1 and above. I am using bower 1.3.12.

Here's my bowerrc file:

{
    "scripts": {
        "postinstall": "./node_modules/grunt-cli/bin/grunt"
    }
}

However, when I install the package using bower, the hook does not get executed. What am I doing wrong?

like image 466
dopatraman Avatar asked Oct 19 '22 14:10

dopatraman


1 Answers

I have the same problem as yours. I have been resolved by add an variable cwd to .bowerrc file:

{
  "cwd": "./",  
   "scripts": {
        "postinstall": "grunt wiredep"
   }
 }
like image 93
Chung Nguyen Avatar answered Oct 22 '22 03:10

Chung Nguyen