FranckMetis FranckMetis - 1 year ago 99
Node.js Question

Grunt command no longer recognized

I have this issue where my grunt is not recognized as a command anymore. I have looked for a solution but most problems are saying I need to use the CLI which I already am. I am on a computer where I have node.js installed and I am currently using it in the project I was before, so no changes on the folder it is in.

C:\Users\fmeloni\Dropbox\Transfer\BananaUnified\sources\Banana>grunt dev
'grunt' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\fmeloni\Dropbox\Transfer\BananaUnified\sources\Banana>grunt --help
'grunt' is not recognized as an internal or external command,
operable program or batch file.

I tried reinstalling npm based on this page : but I have warnings now.

C:\Users\fmeloni\Dropbox\Transfer\BananaUnified\sources\Banana>npm install
npm WARN optional Skipping failed optional dependency /grunt-ts/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
npm WARN Innodirect@1.0.0 No repository field.

I then tried the grunt CLI which resulted in this :

C:\Users\fmeloni\Dropbox\Transfer\BananatUnified\sources\Banana>npm install -g grunt-cli
C:\Users\fmeloni\AppData\Roaming\npm\grunt -> C:\Users\fmeloni\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt
`-- grunt-cli@1.2.0

I have not used the grunt commands for 1 week so there might have been windows update, but there is no new programs installed on my machine. Does anyone have any ideas on how to fix this or what is the meaning of those warnings with the npm install.

Answer Source

The problem was caused by a path issue so I just needed to add to my path %USERPROFILE%\AppData\Roaming\npm

I am unsure why it disappeared.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download