Git Product home page Git Product logo

Comments (6)

acorsetti-conjurer avatar acorsetti-conjurer commented on June 13, 2024 2

OK, I downgraded to v1.1.0.
Now watch and watch-poll options work, BUT it does not restart at file add, rename or remove.
I will test this in a linux environment inside a vagrant machine later. :D

from laravel-mix-glob.

acorsetti-conjurer avatar acorsetti-conjurer commented on June 13, 2024 1

@gravataLonga thanks for the reply!

I tried but in my case it keeps showing the same error

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: read ENOTCONN
    at tryReadStart (net.js:574:20)
    at WriteStream.Socket._read (net.js:585:5)
    at WriteStream.Readable.read (internal/streams/readable.js:481:10)
    at WriteStream.Socket.read (net.js:625:39)
    at resume_ (internal/streams/readable.js:968:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on WriteStream instance at:
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4053,
  code: 'ENOTCONN',
  syscall: 'read'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] watch-poll: `mix watch -- --watch-options-poll=1000`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     C:\Users\my.user\AppData\Roaming\npm-cache\_logs\2021-04-16T07_32_38_028Z-debug.log

I don't know where the error comes from. And the fact that the npm run dev works properly just confuses me...

@MohamedLamineAllal maybe it's really a bug with the current version watch option, if the watch command is known to work in older versions, I can use them for now. For me it is important that the watch works due to my project requirements.

from laravel-mix-glob.

MohamedLamineAllal avatar MohamedLamineAllal commented on June 13, 2024

Hi @gravataLonga. Sorry for being late. I was too busy that i wasn't checking.
Can you send me the package.json. I will investigate the problem.
I don't think it's related to issue 2. As it revolve only around spawning npm process. Which is needed when restarting the watch. The issue 2 is fixed. A PR was provided by the one that issued it. And it was merged. We are using "cross-spawn" package. [still i will check]

If you can provide a repo that replicate the problem. It will be nice.

Otherwise i will investigate the possible cause. Test some hypotheses and come back.

Thank you.

from laravel-mix-glob.

acorsetti-conjurer avatar acorsetti-conjurer commented on June 13, 2024

Hello,
Sorry to reopen this. I'm facing the same error that @gravataLonga

I get this error when running npm run watch or npm run hot:

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: read ENOTCONN
    at tryReadStart (net.js:574:20)
    at WriteStream.Socket._read (net.js:585:5)
    at WriteStream.Readable.read (internal/streams/readable.js:481:10)
    at WriteStream.Socket.read (net.js:625:39)
    at resume_ (internal/streams/readable.js:968:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on WriteStream instance at:
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4053,
  code: 'ENOTCONN',
  syscall: 'read'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] watch: `mix watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\my.user\AppData\Roaming\npm-cache\_logs\2021-04-15T14_09_44_444Z-debug.log

But when I run npm run dev the error doesn't throw. And the files are compiled correctly as expected.

My environment is:

  • OS: Windows 10
  • Node: v14.16.0
  • Npm: v6.14.11
  • package.json:
{
  "name": "project",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "directories": {
    "doc": "doc"
  },
  "scripts": {
    "dev": "npm run development",
    "development": "mix",
    "watch": "mix watch",
    "watch-poll": "mix watch -- --watch-options-poll=1000",
    "hot": "mix watch --hot",
    "prod": "npm run production",
    "production": "mix --production"
  },
  "keywords": [],
  "author": "my.user",
  "license": "ISC",
  "devDependencies": {
    "laravel-mix": "^6.0.16",
    "laravel-mix-glob": "^1.1.9",
    "postcss": "^8.2.10",
    "resolve-url-loader": "^3.1.2",
    "sass": "^1.32.8",
    "sass-loader": "^10.1.1"
  },
  "dependencies": {}
}

Thanks for this package, it is very useful!!

from laravel-mix-glob.

gravataLonga avatar gravataLonga commented on June 13, 2024

The only way to resolve the problem was running as npm run watch-poll

from laravel-mix-glob.

gravataLonga avatar gravataLonga commented on June 13, 2024

Sorry my bad, you need to change something in package.json too..

from laravel-mix-glob.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.