Installing Grunt on OS X - node.js

Here's what I've done so far:
brew install nodejs npm
npm install -g grunt
I've also set up my path to include the proper directories. When I run echo $PATH I get:
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/lib/node:/usr/local/lib/node_modules:/usr/local/share/npm/bin:/usr/local/share/npm/lib/node_modules:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/landonschropp/.rbenv/shims:/usr/local/sbin:/usr/local/lib/node:/usr/local/lib/node_modules:/usr/local/share/npm/bin:/usr/local/share/npm/lib/node_modules:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
The installation succeeds without any problems. However, if I try to run grunt I get this error:
zsh: permission denied: grunt
Did I miss a step?

Try installing the command line interface:
npm install -g grunt-cli

sudo npm install -g grunt-cli and then type your password.

Related

npm install from package.json, the dependancy -v yields command not found

Reinstalled node/npm from scratch and after npm install I can see the node_modules folder with all of the content from package.json. Checking gulp -v gives command not found in the command line on a mac. If I install gulp globally, gulp -v yields the version.
Is there a way of not installing all dependancies globally to use?
Generally gulp is a package which is used to run some task. These task might need to have administrator privileges. So it is better to install it globally using "npm install -g gulp" command. Here -g means "install it globally".
npm install installs the package locally.

Grunt is not recognised : windows7 64-bit

I have installed npm and installed grunt, but when i run grunt, it says 'grunt' is not recognized as an internal or external command.
I done the below steps in command prompt
npm install
npm install -g grunt-cli
PATH variable and grunt folder are available but still i am not able to run grunt.
Please provide me a solution for this
You have only installed the command line interface.
Use npm install -g grunt to install the actual program.

JSHINT tar unpack error

I'm trying to install jshint to use with Sublime. I've successfully installed node.js and have installed SublimeLinter and SublimeLinter-jshint packages but whenever I type npm install -g jshint
into terminal, I get the following:
have tried using npm cache clean but it doesn't work.
As the error message clearly says, you need to run the command as root/Administrator. Prepend your command with sudo:
sudo npm install -g jshint
(assuming you have Administrator access), enter your password at the prompt, and the install will proceed.

Getting grunt command not working

All the npm installs gave errors and warnings but would say "Everything is ok" at the end.
When I tried grunt serve, I got these warnings.
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-contrib-htmlmin" not found. Is it installed?
>> Local Npm module "grunt-contrib-cssmin" not found. Is it installed?
>> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
>> Local Npm module "grunt-bower-requirejs" not found. Is it installed?
>> Local Npm module "grunt-eslint" not found. Is it installed?
>> Local Npm module "grunt-jscs" not found. Is it installed?
How do I fix it?
Are you installing on a Mac or Windows?
First, make sure the Grunt Client is installed within your directory:
$ npm install -g grunt-cli
Then:
$ npm install grunt-serve
Further documentation of installation can be found here:
https://www.npmjs.org/package/grunt-serve
Try as below:
1) npm install -g grunt-cli
This will put the grunt command in your system path, allowing it to be run from any directory.
Note that installing grunt-cli does not install the Grunt task runner! The job of the Grunt CLI is simple: run the version of Grunt which has been installed next to a Gruntfile. This allows multiple versions of Grunt to be installed on the same machine simultaneously.
2) npm install grunt --save-dev
3) npm install grunt-serve
The easiest way to add Grunt and gruntplugins to an existing package.json is with the command npm install --save-dev. Not only will this install locally, but it will automatically be added to the devDependencies section, using a tilde version range.
for further assistance follow this link
http://gruntjs.com/getting-started

How to remove all npm packages on mac

I have mistake i install two packages (grunt and after that yeoman) but with sudo... i wish i do that in other way so i need to delete those two packages...
When i run command npm uninstall yeoman -g or npm remove yeoman -g with sudo or without i get this error
npm WARN uninstall not installed in /usr/local/lib/node_modules: "yeoman"
zsh: no such file or directory: /Users/username/.rvm/bin/rvm-prompt
~ [05:54:26]
So how can i delte that :S

Resources