Search code examples
reactjsbuildserve

React serve -s build, The term 'serve' is not recognized as the name of a cmdlet


Hello I am trying to build my react app so I did yarn build and it created the necessary folder now I am trying to do serve -s build and it's telling me the error below

Error

** I have tried to uninstall and reinstall serve by npm uninstall -g serve and npm install -g serve and I found the serve folder in C:\Users\Nairi\AppData\Roaming\npm\node_modules


Solution

  • Try npx serve -s build I don't know why but they happened to me also and this worked