'rollup' is not recognized as an internal or external command
Asked Answered
R

4

10

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

Raye answered 1/10, 2021 at 0:17 Comment(3)
interesting, perhaps this might be of interest github.com/Esri/ago-assistant/issues/176Dovelike
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.Raye
I just got this error because I forgot the npm install command in my corresponding folder.Photoelasticity
R
4

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?

Raye answered 4/10, 2021 at 15:48 Comment(0)
A
4
npm install

fixed this issue for me

Auk answered 26/10, 2022 at 7:32 Comment(1)
easy solution for meTerrilyn
C
2
  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

Consternate answered 4/10, 2021 at 9:3 Comment(4)
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?Raye
@CarlDaveTampoy It may not have the .exe extension, is there anything that you can execute in that folder? It may just be called rollup.Consternate
@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.Raye
@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 installConsternate
B
-1

I have this error now and i saw some of the comment to reinstall the rollup because it's not found in the dependency and cause an error even npm install is executed.

To resolve it you must reinstall the rollup like npm install -D rollup or maybe npm install rollup. I forgot the exact command but the important is it will be added in here in package.json:

"dependencies": {
        "@fortawesome/fontawesome-free": "^6.5.2",
        "bootstrap": "^5.3.3",
        "rollup": "^4.18.1"
    }

If there will be issue conflicting from the node_modules then reinstall it rm -rf node_modules package-lock.json an install again npm install it will create new package-lock.json then that resolves my problem.

Baba answered 14/7 at 8:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.