Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 378 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'grunt' is not recognized as an internal or external command for some windows users

#1
Grunt is not working for all Windows users. Some users are facing some issues, when I run `npm install` command; it prints a message as below.

E:\Worksapce\web>npm install
npm WARN package.json [email protected] No repository field.

When I tried `npm install -g grunt-cli`, I think it is successful.

E:\Worksapce\web>npm install -g grunt-cli
npm http GET

[To see links please register here]

npm http 304

[To see links please register here]

npm http GET

[To see links please register here]

npm http GET

[To see links please register here]

npm http GET

[To see links please register here]

npm http 304

[To see links please register here]

npm http 304

[To see links please register here]

npm http 304

[To see links please register here]

npm http GET

[To see links please register here]

npm http 304

[To see links please register here]

npm http GET

[To see links please register here]

npm http GET

[To see links please register here]

npm http 304

[To see links please register here]

npm http 304

[To see links please register here]

npm http GET

[To see links please register here]

npm http GET

[To see links please register here]

npm http 304

[To see links please register here]

npm http 304

[To see links please register here]

npm http GET

[To see links please register here]

npm http GET

[To see links please register here]

npm http 304

[To see links please register here]

npm http 304

[To see links please register here]

C:\Users\user1234\AppData\Roaming\npm\grunt -> C:\Users\user1234\AppData\Roaming
\npm\node_modules\grunt-cli\bin\grunt
[email protected] C:\Users\user1234\AppData\Roaming\npm\node_modules\grunt-cli
+-- [email protected]
+-- [email protected] ([email protected])
+-- [email protected] ([email protected], [email protected])

But when I run grunt, I get an error message like this:

E:\Worksapce\web>
E:\Worksapce\web>grunt
'grunt' is not recognized as an internal or external command,
operable program or batch file.

My package.json is this.

{
"author": "Company",
"name": "registers",
"version": "4.0.0",
"homepage": "http://abcd.se",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.4",
"grunt-contrib-jshint": "~0.9.2",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-less": "~0.11.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-ngmin": "0.0.3",
"grunt-contrib-jasmine": "~0.5.2"
}
}

Another user is succesfully able to execute grunt with out any issues. This only stands for some of the users.

Can some one tell me what has gone wrong.

















Reply

#2
Incase that there some developer that used Windows XP, that have similar problem you'll need to change **Path** entry.

**From**:
C:\Users\change_username\AppData\Roaming\npm\grunt

**To**:
C:\Documents and Settings\change_username\Application Data\npm
Reply

#3
On Windows 8, Grunt needs to have the following added to the `PATH`:

C:\Users\your_username\AppData\Roaming\npm

On some systems, the number of characters allowable in the PATH is limited, and this can cause the correct path needed by grunt to not be added, even after `npm install -g grunt-cli` is run. Some settings (for example for certain programs you have installed) can be safely removed from the PATH, as they're generally there as a failsafe and often aren't required. If you have this issue:

- Backup the variables in your `PATH` (This PC > right-click > Properties > Advanced system settings > Environment Variables > 'Edit' the 'Path' user variables for the current user, and copy the 'Variable value' and save it somewhere)
- Remove some of the values from the `PATH`, and add in the path `C:\Users\your_username\AppData\Roaming\npm`

Also, make sure that after installing the Grunt CLI and adding the path, that you close any open command windows and re-open them before trying a `Grunt`
Reply

#4
Grunt is no longer installed globally. See the [Getting Started][1] page for more information.

The command below should help you fix this;

npm install -g grunt-cli


[1]:

[To see links please register here]

Reply

#5
`Grunt-CLI` is installed inside %AppData%\npm, so the best directory to add to your `%PATH%` is:

%AppData%\npm
Reply

#6
Your logs indicate that the `grunt` command was created in your global directory. The errors also indicate that `C:\Users\mc862634\AppData\Roaming\npm\` is not in your path.

You'll want to check your `PATH` and make sure that the `\AppData\Roaming\npm` location is added if it is missing.

The easiest way to check is to open a command prompt and type `PATH`.

See this other StackOverflow question as a reference: [Grunt on Windows 8: 'grunt' is not recognized](

[To see links please register here]

)
Reply

#7
npm install grunt -g (or) npm install -g grunt-cli
Please check your computer environmental variable path, it should contain the path of AppData. EX: E:\$APPDATA\npm\;

MyComputer->Right click-> Properties ->Advances System Setting-> Environment Variables -> Path
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through