Rollup not recognized as a command when running grunt
See original GitHub issueRunning 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:
- Created 6 years ago
- Comments:10 (10 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?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"
wherenode_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.