einsteinpp's avatar

The scripts didn't work in standalone.

Hello,

ok so wanted to start a new project using ES2015 & sass so I install laravel mix and webpack, copy paste the scripts but I get this output :

'cross-env' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.

In english : 'cross-env' not recognized as an internal or external command" in Windows Or something like that.

Happen only in standalone project, when using laravel it never happen.

0 likes
3 replies
Demers94's avatar

Have you added the scripts ( https://github.com/JeffreyWay/laravel-mix/blob/master/docs/installation.md#npm-scripts ) to your package.json file, before running npm run watch (or whichever command you want)

"scripts": {
    "dev": "cross-env NODE_ENV=development webpack --progress --hide-modules",
    "watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules",
    "hot": "cross-env NODE_ENV=development webpack-dev-server --inline --hot",
    "production": "cross-env NODE_ENV=production webpack --progress --hide-modules"
  }

I remember getting a similar error message when using standalone elixir without changing the scripts.

einsteinpp's avatar

Yes i did, the problem is the cross-env command. Because if I use this script :

"watch": "set NODE_ENV=development&&webpack&&--watch --progress --hide-modules",

It work

Please or to participate in this conversation.