
Estoy intentando ejecutar npm run watch para implementar los cambios que realicé en mis archivos de activos, pero no funciona. Estoy creando una herramienta laravel.
Instalé npm sin ningún error, pero cuando ejecuté npm run watch recibí el siguiente error. Gracias por la ayuda.
> npm run development -- --watch
> @ development C:\Users\\Documents\tool
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"
'cross-env' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development 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! C:\Users\AppData\Roaming\npm-cache\_logs\2019-08-13T08_58_29_406Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `npm run development -- --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch 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! C:\Users\AppData\Roaming\npm-cache\_logs\2019-08-13T08_58_29_436Z-debug.log
Respuesta1
te falta corss-env
el módulo de nodo
intenta seguir
- Eliminar
node_modules
carpeta de su proyecto - Ejecute este comando
npm install --global cross-env
. - Eliminar
"cross-env": "^5.0.1"
, depackage.json
la sección devDependencies del archivo. - Correr
npm install --no-bin-links
- Ahora
run npm run dev