Executando npm para aplicação laravel

Executando npm para aplicação laravel

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-envo módulo do nó

tente seguir

  1. Exclua node_modulesa pasta do seu projeto
  2. Execute este comando npm install --global cross-env.
  3. Exclua "cross-env": "^5.0.1", da package.jsonseção devDependencies do arquivo.
  4. Corrernpm install --no-bin-links
  5. Agorarun npm run dev

informação relacionada