Unable to install grunt on windows 8 - gruntjs

Been trying to install Grunt on my laptop to try it out, I already had Node, so installed the Grunt cli which went ok and then ran the command npm init to create the package.json file, followed the necessary steps and also went well, however when I get to the point of installing dependencies, I get an error.
For instance am trying to install Grunt as a dependency, with the following command:
npm install grunt --save-dev
After running this command I get the following error:
No README.md file found
If anyone knows what I am meant to do please let me know.

Related

jit-grunt: Plugin for the “clean” task not found

After running grunt clean in magento 2.1.3 root folder I get error
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings
Warning: Task "clean" failed. Use --force to continue.
Aborted due to warnings.
I tried npm install clean & npm install clean --save-dev but get the same error.
I looked at the url for static mapping, but it is not clear in the Magento environment what I should add where?
How do I solve this error?
Try this:
npm install grunt-clean --save-dev
or
npm install grunt-contrib-clean --save-dev
Please refer to Gruntfile.js

Unable to install Grunt ?

I've installed grunt :
sudo npm install -g grunt-cli
/Users/user/.nvm/versions/node/v4.3.0/bin/grunt -> /Users/user/.nvm/versions/node/v4.3.0/lib/node_modules/grunt-cli/bin/grunt
/Users/user/.nvm/versions/node/v4.3.0/lib
└── grunt-cli#1.2.0
But when i run grunt i have errors:
grunt
grunt-cli: The grunt command line interface (v1.2.0)
Fatal error: Unable to find local grunt.
If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:
http://gruntjs.com/getting-started
Where i am wrong please ?
you have to install grunt globally and locally
you have installed the cli globally with the -g flag
now you have to install it locally in your package.json with ...
npm install -SD grunt
then your "grunt" command will work - assuming you have a valid gruntfile
This looks like a duplicate of Fatal error: Unable to find local grunt.
In a nutshell, try running grunt:init or npm:init first (depending on the version you have. See linked question for more details.
install the command-line interface:
npm install -g grunt-cli
install the local task runner:
cd [my project root]
npm install grunt --save-dev
define your Gruntfile.js as per http://gruntjs.com/getting-started#the-gruntfile
run the tasks with: grunt

trying to install Grunt locally

I am trying to install Grunt locally and after typing the following:
npm install grunt-cli --save-dev
I get the following errors:
Do I need to change some network settings?

grunt not installing/available globally

I'm trying to install grunt globally using the following command from the command line:
npm install -g grunt
The installation command seems to succeed with no errors written to the console. However, when I enter grunt at the command line after install I get the following error:
'grunt' is not recognized as an internal or external command, operable program or batch file
It looks like the install command installs grunt into the following directory by default:
c:\users\my_login_id\appdata\roaming\npm\node_modules\grunt
Not sure if the user-specific install directory might have anything to do with the issue? Any idea what might be causing the problem or how to debug?
You don't need to install grunt globally. I suggest you make grunt a dependency of your project. That way anyone can execute a npm install and get grunt. If you want to use the terminal commands, then you must install the command line interface package
Use:
npm install -g grunt-cli

Error with grunt (grunt-contrib)

If I want to install a package via npm globally, then I get the following error repeatedly... Has anybody an idea to solve this problem?
The short answer is don't install grunt-contrib. It used to be a small collection of tasks but as the grunt-contrib-* series grew, so did that library.
Nobody ever needs to install every grunt-contrib-* library. Instead, just install the tasks you need: npm install grunt-contrib-compress --save-dev
Otherwise, if you insist, install the peer dependency version it expects npm install grunt-contrib-compress#0.6.1 and try installing again: npm install grunt-contrib.

Resources