Skip to content
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

Console logs not appearing when running Express app with nodemon #233888

Open
dee-goyal opened this issue Nov 15, 2024 · 2 comments
Open

Console logs not appearing when running Express app with nodemon #233888

dee-goyal opened this issue Nov 15, 2024 · 2 comments
Assignees

Comments

@dee-goyal
Copy link

dee-goyal commented Nov 15, 2024

Type: Bug

When running my Express app using nodemon, the console logs (e.g., console.log()) do not appear in the terminal. Additionally, nodemon opens a browser window unexpectedly, which is not desired behavior.

package.json

{
"name": "backend",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},

"author": "Deepika Goyal",
"license": "ISC",
"description": "",
"dependencies": {
"express": "^4.21.0",
"mongoose": "^5.13.19",
"mongoose-delete": "^1.0.2",
"nodemon": "^3.1.7"
}
}

index.js

const express = require('express');
const app = express();
const port = 5000;
app.get('/', (req, res) => {
res.send('Hello World!');
});

app.listen(port, () => {
console.log(Example app listening on port ${port});
});

IT WAS WORKING SMOOTHLY FEW WEEKS BACK, BUT NOT NOW

Image

VS Code version: Code 1.95.2 (e865366, 2024-11-07T11:07:22.054Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs AMD Ryzen 5 5600H with Radeon Graphics (12 x 3294)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 7.35GB (0.52GB free)
Process Argv --crash-reporter-id 46989261-4195-4742-be00-ad36f36c34d8
Screen Reader no
VM 0%
Extensions (33)
Extension Author (truncated) Version
phpserver bra 3.0.2
vscode-eslint dba 3.0.10
javascript-ejs-support Dig 1.3.3
es7-react-js-snippets dsz 4.4.3
vscode-toggle-column-selection eri 1.0.6
prettier-vscode esb 11.0.0
figma-vscode-extension fig 0.4.0
file-icons fil 1.1.0
auto-close-tag for 0.5.15
auto-rename-tag for 0.1.10
code-runner for 0.12.2
copilot Git 1.245.0
copilot-chat Git 0.22.2
vscode-pull-request-github Git 0.100.1
rainbow-csv mec 3.12.0
debugpy ms- 2024.12.0
python ms- 2024.20.0
vscode-pylance ms- 2024.11.2
jupyter ms- 2024.10.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.21
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
cmake-tools ms- 1.19.52
cpptools ms- 1.22.11
cpptools-extension-pack ms- 1.3.0
color-highlight nau 2.8.0
vscode-xml red 0.27.1
cmake twx 0.0.17
JavaScriptSnippets xab 1.8.0
php-debug xde 1.35.0
php-pack xde 1.0.3
php-intellisense zob 1.3.3

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551cf:31179979
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
01bff139:31013167
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl2:31139839
pythonrstrctxt:31112756
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31181875

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.95.3. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@dee-goyal
Copy link
Author

@mojodna @doudou @mkhl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants