8

I would like to ask if how should I fix this issue because I am already stuck and confused about this part. I already installed rollup globally using this command

npm install --global rollup

However when I tried to run the 'rollup' command then I should expect the rollup information or something will show in my CLI? but my CLI shows

'rollup' is not recognized as an internal or external command, operable program or batch file.

What I have done so far is.

  1. Updated the NPM
  2. Reinstall the rollup globally.

I already read some documentation but the issue is still showing.https://github.com/Esri/ago-assistant/issues/176

Please enlighten me. Thank you

cdt
  • 135
  • 1
  • 1
  • 9
  • interesting, perhaps this might be of interest https://github.com/Esri/ago-assistant/issues/176 – jspcal Oct 01 '21 at 00:18
  • Thanks, @jsocaI, already tried it but the issue is still there on my end. I don't know how they fixed the issue? because they already close the issue. – cdt Oct 01 '21 at 00:22
  • I just got this error because I forgot the `npm install` command in my corresponding folder. – Sezgin İbiş Jun 25 '22 at 14:39

3 Answers3

3
npm install

fixed this issue for me

Max Will
  • 258
  • 2
  • 10
2

What I just have done just to run the script globally.

I just added these scripts in my package.json to run the rollup using NPM.

 "scripts": {
"rollup": "rollup" 

is this okay?

cdt
  • 135
  • 1
  • 1
  • 9
1
  1. Try restarting your terminal

  2. Try locating where the Rollup binary is installed %AppData%\npm\node_modules or %AppData%\roaming\npm\node_modules and run it manually like

    %AppData%\npm\node_modules\rollup\bin\rollup.exe

E.Eldridge
  • 103
  • 8
  • Hi @E.Eldridge,I just want to ask if I should have this file rollup.exe in the rollup directory? because upon checking, I haven't see rollup.exe in the rollup directory? – cdt Oct 04 '21 at 14:16
  • @CarlDaveTampoy It may not have the .exe extension, is there anything that you can execute in that folder? It may just be called **rollup**. – E.Eldridge Oct 04 '21 at 14:43
  • @E.Elridge , my node_modules in a rollup directory is empty but in the dist folder there is rollup.browser.js rollup.d.ts and rollup.js. – cdt Oct 04 '21 at 15:03
  • @CarlDaveTampoy Look in the **bin** folder next to those files. You should be able to run `node_modules/rollup/dist/bin/rollup`. If that doesn't work then delete your **node_modules** folder and **package-lock.json** and re-run `npm install` – E.Eldridge Oct 04 '21 at 15:14