‘cross-env’ Installation error

After Cloning a payload project and while running if we get an error as ‘cross-env’ is not recognized as an internal or external command, operable program or batch file typically occurs when typically occurs when the cross-env package is not installed or not available in your project. The cross-env package allows you to set environment variables across different platforms in a way that works consistently.

To resolve this, follow these steps:

1.Install cross-env:

Run the following command to install cross-env as a development dependency:

npm install cross-env –save-dev

2.Re-run the development server:

After installing cross-env, try running the development server again:

npm run dev

Leave a comment

Your email address will not be published. Required fields are marked *