
Ich versuche, npm run watch auszuführen, um die Änderungen zu implementieren, die ich in meinen Asset-Dateien vorgenommen habe, aber es funktioniert nicht. Ich erstelle ein Laravel-Tool.
Ich habe npm ohne Fehler installiert, aber als ich npm run watch ausführte, erhielt ich den folgenden Fehler. Danke für die Hilfe.
> 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
Antwort1
Ihnen fehlt corss-env
das Knotenmodul
Versuchen Sie Folgendes
node_modules
Ordner aus Ihrem Projekt löschen- Führen Sie diesen Befehl aus
npm install --global cross-env
. - Löschen Sie
"cross-env": "^5.0.1"
auspackage.json
dem Abschnitt „devDependencies“ der Datei. - Laufen
npm install --no-bin-links
- Jetzt
run npm run dev