question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rollup not recognized as a command when running grunt

See original GitHub issue

Running a grunt --force on Windows results in

Running "shell:command" (shell) task
'rollup' is not recognized as an internal or external command,
operable program or batch file.
Warning: Command failed: rollup -c
'rollup' is not recognized as an internal or external command,
operable program or batch file.
 Used --force, continuing.

Could it be a dependency issue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

8reactions
nhemingercommented, Apr 18, 2017

Running npm install -g rollup fixes the problem. Possible to fix the dependencies or add documentation to the readme instructions so those running grunt will have it work?

3reactions
ecaldwellcommented, Apr 18, 2017

I think the solution is to specify the path to node_modules in the shell command. You can see this in my Gruntfile on #178.

Now the command looks like this rollup: "<%= node_modules %>rollup -c" where node_modules is defined earlier in the config as .\\node_modules\\.bin\\.

I tried a variety of combinations to get this to execute properly and this was the only way that worked. Unfortunately, the escaped backslashes are necessary—using forward slashes caused errors. It would be good for someone on a Unix machine to verify if this works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'rollup' is not recognized as an internal or external command
3 Answers 3 · Try restarting your terminal · Try locating where the Rollup binary is installed %AppData%\npm\node_modules or %AppData%\roaming\npm ...
Read more >
rollup is not recognized as an internal or external command
To solve the error rollup is not recognized as an internal or external command, operable program or batch file, install the rollup module...
Read more >
grunt-rollup - npm
Start using grunt-rollup in your project by running `npm i grunt-rollup`. There are 3 other projects in the npm registry using grunt-rollup.
Read more >
My command prompt doesn't recognize 'grunt' as a command.
In my command prompt I typed grunt in my project directory and it says: "'grunt' is not recognized as a internal or external...
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
You can install the app we'll be working with during this tutorial by running the following command into your terminal.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found