-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodemon hangs if started without internet connection #2096
Comments
Yoinks! Definitely need to fix that. I used to work offline all the time
pre-pandemic times, so hars definitely not acceptable!
…On Mon, 16 Jan 2023, 00:43 David Husz, ***@***.***> wrote:
- Versions: ***@***.***, ***@***.***
- nodemon -v: 2.0.20
- Operating system/terminal environment (powershell, gitshell, etc):
fish on gnome-terminal on ubuntu
- Using Docker? What image: no
- Command you ran: npx nodemon server.js
Expected behaviour
When I run npx nodemon server.js while connected to the internet, the
server starts up as expected, preceded by nodemon printing its info
messages. When I run the same without an internet connection, I expect it
to behave the same.
Actual behaviour
When starting nodemon without an internet connection, the program hangs
indefinitely, without printing anything to the terminal. This happens even
when just running nodemon --help.
Steps to reproduce
1. Disconnect your internet
2. Invoke nodemon
------------------------------
nodemon --dump:
{
run: false,
required: false,
timeout: 1000,
options: {
dump: true,
ignore: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**',
re: /.*.*\/\.git\/.*.*|.*.*\/\.nyc_output\/.*.*|.*.*\/\.sass\-cache\/.*.*|.*.*\/bower_components\/.*.*|.*.*\/coverage\/.*.*|.*.*\/node_modules\/.*.*/
],
watch: [ '*.*', re: /.*\..*/ ],
monitor: [
'*.*',
'!**/.git/**',
'!**/.nyc_output/**',
'!**/.sass-cache/**',
'!**/bower_components/**',
'!**/coverage/**',
'!**/node_modules/**'
],
ignoreRoot: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**'
],
restartable: 'rs',
colours: true,
execMap: { py: 'python', rb: 'ruby', ts: 'ts-node' },
stdin: true,
runOnChangeOnly: false,
verbose: false,
signal: 'SIGUSR2',
stdout: true,
watchOptions: {},
execOptions: {
script: 'server.js',
exec: 'node',
args: [],
scriptPosition: 0,
nodeArgs: undefined,
execArgs: [],
ext: 'js,mjs,json',
env: {}
}
},
load: [Function (anonymous)],
reset: [Function: reset],
lastStarted: 0,
loaded: [],
watchInterval: null,
signal: 'SIGUSR2',
command: {
raw: { executable: 'node', args: [ 'server.js' ] },
string: 'node server.js'
}
}
—
Reply to this email directly, view it on GitHub
<#2096>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADLBBMTGSSZJKMYZ66ZG3WSSKSPANCNFSM6AAAAAAT4FH4MM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
I'm bumping this ^^ |
I think this is an issue with
|
I think this is nodemon itself through the update check. It needs to have either a timeout or a safeguard (I know that try/catch doesn't particularly work). |
It only happens to me if I don't have |
Woah, that's weird then!
…On Tue, 14 Feb 2023, 10:06 Nejc Lovrencic, ***@***.***> wrote:
It only happens to me if I don't have nodemon installed globally, thus I
suspected npx. There are also other similar issues reported there, such
as npm/cli#6157 <npm/cli#6157>. If I install
nodemon globally and disconnect the internet, it seems to work fine.
—
Reply to this email directly, view it on GitHub
<#2096 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADLBAY37EWT25CEUWENQLWXNKK3ANCNFSM6AAAAAAT4FH4MM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I just tried out what @nejclovrencic mentioned and can confirm that the bug also only happens for me when nodemon is not installed globally. Interestingly, as long as it's installed globally it works both when invoking it via |
can you assign this issue to me? I will try to solve this issue. |
@DKdev117 doesn't need to be assigned, you can create a PR (ideally with tests) |
@remy Ok sir thank you |
Is this issue resolved? |
@iamabhshk no - have you seen it lately or are you just asking (because you want to fix it)? |
@remy I mean I just checked from my end but couldn't see such behavior which was mentioned by @davidhusz |
Finally got around to giving this a proper test. It's actually just You get the same behaviour if you disconnect from the web and run any other Try the following (assuming you don't have enhance globally):
It's hang in the same way. I suggest @davidhusz raise this (in a non-nodemon specific way) with npm 👍 |
nodemon -v
: 2.0.20npx nodemon server.js
Expected behaviour
When I run
npx nodemon server.js
while connected to the internet, the server starts up as expected, preceded bynodemon
printing its info messages. When I run the same without an internet connection, I expect it to behave the same.Actual behaviour
When starting
nodemon
without an internet connection, the program hangs indefinitely, without printing anything to the terminal. This happens even when just runningnodemon --help
.Steps to reproduce
nodemon --dump
:The text was updated successfully, but these errors were encountered: