reactjsviteyarnpkg

cross-env REACT_APP_NAME=$npm_package_name REACT_APP_VERSION=$npm_package_version vite


I can't run yarn start in Windows when I removed .vite cash in my node_modules folder

When I run yarn start I get this:

$ yarn start

yarn run v1.22.19

$ cross-env REACT_APP_NAME=$npm_package_name REACT_APP_VERSION=$npm_package_version vite

'cross-env' is not recognized as an internal or external command,

operable program or batch file.

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

If I delete my whole node_modules and run yarn install my problem will be solved but I don't want to do this... because there is no need to remove all node_modules folder when you are on Ubuntu but when you are on Windows every things will change


Solution

  • the best way that worked for me is to delete whole node_modules and run yarn install again i dont know yer the another way but it is what it is ...