Reputation: 321
I've installed bower and grunt on my machine but non of it works. I get :command not found
for both.
I've placed paths to bower and grunt in .bash_profile file, like:
export PATH="/home/user/.node/lib/node_modules/grunt-cli/bin:$PATH"
export PATH="/home/user/.node/lib/node_modules/bower/bin:$PATH"
It feels like packages are installed correctly but it can't be found.
Npm and node is located in home/user/.node and home/user/.npm directories is this is the right place for it?
which bower/grunt
outputs nothing
Upvotes: 0
Views: 1383
Reputation: 119
Just had to remind myself of this one, to set up environment on a new machine.
As per http://gruntjs.com/getting-started, there are two steps required for installation and use of Grunt.js task runner on a given project:
You should globally install only 'grunt-cli', the Grunt Command Line Interface. This will put the grunt
command on your system path. This is achieved by running npm install -g grunt-cli
, which may require root privileges depending on your setup.
You should locally install the grunt task runner proper. This is achieved by running npm install
, after adding the desired version of Grunt.js to your project's package.json
file. This will install the specific version of Grunt.js described in your project's package.json, under the devDependencies
section. This is the file used by nodejs to describe project development and deployment dependencies, among other stuff.
Upvotes: 1