Laravel 5.4 ‘cross-env’ Is Not Recognized as an Internal or External Command

前端 未结 16 1123
被撕碎了的回忆
被撕碎了的回忆 2020-11-29 17:04

I\'m trying to run npm run dev for Laravel Mix and I get this error:

> @ dev D:\\projects\\ptcs
> cross-env NODE_ENV=development webpack -         


        
16条回答
  •  眼角桃花
    2020-11-29 17:51

    The following worked for Laravel 7.x (and should probably work for any other version as well given the nature of the issue).

    npm uninstall --save-dev cross-env
    npm install -g cross-env
    

    Just moving cross-env from being a local devDependency to a globally available package.

提交回复
热议问题