Cross-env problem, when opening in a web browser

Trying to run my app using “Open in Web Browser” and get the following error , apparently related to the cross-env command:

Local web server output

exported-from-react-studio@0.0.1 start /Users/markodev/projects/ReactStudio/Works In Progress/Measure Explorer App - Measure Explorer
cross-env PORT=3000 react-scripts start

sh: cross-env: command not found
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! exported-from-react-studio@0.0.1 start: cross-env PORT=3000 react-scripts start
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the exported-from-react-studio@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/markodev/Library/Application Support/React Studio/NodeJS/npm-cache/_logs/2021-09-16T23_23_46_127Z-debug.log

There’s nothing useful in the log. Tried to run npm install cross-env. No luck. I was able to do this earlier today, and all of a sudden - blammo. Thanks!!

Hi, could you please try run ‘npm install’ in your project folder (/Users/markodev/projects/ReactStudio/Works In Progress/Measure Explorer App - Measure Explorer) in Terminal to see if that helps? You seem to be missing cross-env program in your system. Running ‘npm install’ should install it.

Running “npm install” in the project folder solved the issue. Thanks!!

1 Like