M-Zuber / npm-watch

run npm scripts when files change
MIT License
323 stars 38 forks source link

Annoying "npm update check" message #77

Closed crystalfp closed 3 years ago

crystalfp commented 3 years ago

I'm watching various tasks and frequently I receive the following message. It is generated, I think, by race condition between two tasks. Note also I'm on windows and the message's suggestion makes no sense in this environment.

[build:sass] [nodemon] 2.0.4
[build:sass] 
┌─────────────────────────────────────────────────────────────┐
│                   npm update check failed                   │
│             Try running with sudo or get access             │
│            to the local update config store via             │
│ sudo chown -R $USER:$(id -gn $USER) C:\Users\mvalle\.config │
└─────────────────────────────────────────────────────────────┘
[build:sass] [nodemon] clean exit - waiting for changes before restart

What I'm unsure is if after this message the task runs correctly or not. Thanks for clarifying! Better, thanks for fixing! mario

M-Zuber commented 3 years ago

Does it happen for all tasks, in any projects? Or just where node-sass is involved?

crystalfp commented 3 years ago

For all tasks. The tasks involved are usually one or two. I tried to open an issue with nodemon, but no way if I cannot provide a reproducible example. Maybe npm-watch could start the tasks sequentially one after the other.Anyway. Thanks for looking! MarioInviato dal mio Galaxy -------- Messaggio originale --------Da: Mordechai Zuber notifications@github.com Data: 30/12/20 12:39 (GMT+01:00) A: M-Zuber/npm-watch npm-watch@noreply.github.com Cc: Mario Valle mvalle@cscs.ch, Author author@noreply.github.com Oggetto: Re: [M-Zuber/npm-watch] Annoying "npm update check" message (#77) Does it happen for all tasks, in any projects? Or just where node-sass is involved?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/M-Zuber/npm-watch/issues/77#issuecomment-752450680", "url": "https://github.com/M-Zuber/npm-watch/issues/77#issuecomment-752450680", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

M-Zuber commented 3 years ago

I would need a reproduceable example as well

Are you running the most recent version of nodemon?

crystalfp commented 3 years ago

OK, I'll try to setup a minimal example. I started with the nodemon version installed by npm-watch (2.0.4). But the same happens upgrading to 2.0.6

crystalfp commented 3 years ago

Here is a minimal example. BugNpmWatch.zip Unzip somewhere then:

cd BugNpmWatch
npm i
npm run watch

you have to run the watch script several times (after Ctrl-C the running one) to see the npm update check failed message. For me it happens generally at the third attempt. BTW, I'm on Windows 10 64bits. Thanks for looking! mario

crystalfp commented 3 years ago

Seems does not happens anymore. Thanks!