
Estou tentando executar npm run watch para implementar as alterações que realizei em meus arquivos de ativos, mas não está funcionando. Estou criando uma ferramenta laravel.
Instalei o npm sem erros, mas quando executo npm run watch recebi o seguinte erro. Obrigado pela ajuda.
> 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
Responder1
está faltando corss-env
o módulo do nó
tente seguir
- Exclua
node_modules
a pasta do seu projeto - Execute este comando
npm install --global cross-env
. - Exclua
"cross-env": "^5.0.1"
, dapackage.json
seção devDependencies do arquivo. - Correr
npm install --no-bin-links
- Agora
run npm run dev