Vous ne savez pas si le problème est lié à laravel-mix, mais j'ai un problème avec le paquet Browsersync. Voici mes mix.js:Laravel-mix - BrowserSync lançant une erreur à event.js: 160
mix.js('resources/assets/js/app.js', 'public/js')
.browserSync({proxy: 'localhost:8000'})
.sass('resources/assets/sass/app.scss', 'public/css');
Quand je lance npm run watch-poll
(watch
ne décrochez pas les changements, d'où le watch-poll
see here) J'obtiens l'erreur suivante sur la console:
[Browsersync] Watching files...
events.js:160
throw er; // Unhandled 'error' event
^
Error: watch resources/views/auth/passwords ENOSPC
at exports._errnoException (util.js:1020:11)
at FSWatcher.start (fs.js:1443:19)
at Object.fs.watch (fs.js:1470:11)
at createFsWatchInstance (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleDir (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:407:19)
at FSWatcher.<anonymous> (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:455:19)
at FSWatcher.<anonymous> (/home/tanmay/LVProjects/learningdemo/node_modules/chokidar/lib/nodefs-handler.js:460:16)
at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch-poll"`
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! /home/tanmay/.npm/_logs/2017-08-07T07_02_31_677Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch-poll 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! /home/tanmay/.npm/_logs/2017-08-07T07_02_31_725Z-debug.log
I suis sur: Ubuntu 16.04.3 (Pas un VM). Course à pied: NodeJS v6.11.2, NPM v5.3.0
Quand je commente le .browserSync()
appel de mes mix.js:
mix.js('resources/assets/js/app.js', 'public/js')
// .browserSync({proxy: 'localhost:8000'})
.sass('resources/assets/sass/app.scss', 'public/css');
cependant, l'erreur ne persiste plus. Comment contourner le problème? N'hésitez pas à demander toute autre information nécessaire.
Voici mon fichier package.json
MISE À JOUR: Cette erreur ne se produit pas sur un nouveau projet de Laravel. Pour obtenir le même résultat que d'un nouveau projet, ce que je l'ai fait:
J'ai supprimé les modules de noeud: rm -rf node_modules
j'ai supprimé le fichier package-lock.json: rm package-lock.json
Je réexécuter: npm install
, npm run dev
, npm run watch-poll
Résultat: toujours la même erreur :(
Même erreur ici; juste une petite question que vous dites dans votre mise à jour "Cette erreur ne se produit pas sur un nouveau projet laravel", mais vous terminez la déclaration avec "Résultat: toujours la même erreur :("!? Voulez-vous dire aucune erreur avec ces étapes dans un nouveau projet, mais toujours dans votre existant? Merci – retrovertigo
@retrovertigo Pas d'erreur dans un nouveau projet "si" je lance "sudo npm run watch" au lieu de "npm run watch" Et comme vous pouvez probablement le deviner, après 4 mois de ce post, j'ai encore rencontré ce problème sur une nouvelle machine, je suis vraiment déprimé par ce problème – Eisenheim