最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - console.log not displaying anything in the terminal (node JS) - Stack Overflow

matteradmin6PV0评论

im still very new to nodeJS and i have run into a problem.

whenever i try to log something from my aplication to the terminal using " node [application name]" nothing happen please help if you can, thank you!

please keep in mind that it was working before so i broke it

i have already tried to use another terminal (bash) and nothing happend; but for some reason when i use nodemon it works im very confused so any thing will be helpful

CODE:

console.log('hello world...');

TERMINAL:

PS C:\Users\nsc\Desktop\npm> node app

PS C:\Users\nsc\Desktop\npm> 

im still very new to nodeJS and i have run into a problem.

whenever i try to log something from my aplication to the terminal using " node [application name]" nothing happen please help if you can, thank you!

please keep in mind that it was working before so i broke it

i have already tried to use another terminal (bash) and nothing happend; but for some reason when i use nodemon it works im very confused so any thing will be helpful

CODE:

console.log('hello world...');

TERMINAL:

PS C:\Users\nsc\Desktop\npm> node app

PS C:\Users\nsc\Desktop\npm> 
Share Improve this question edited Aug 22, 2021 at 10:11 Thatkookooguy 7,0421 gold badge33 silver badges59 bronze badges asked Aug 22, 2021 at 10:07 ArabDROPSArabDROPS 1011 silver badge7 bronze badges 3
  • hey ArabDROPS! Wele! is there any more information you can share? maybe explain what you did that broke the normal behavior? it's hard to help you fix this with only the information you provided. thanks! – Thatkookooguy Commented Aug 22, 2021 at 10:10
  • Seems odd. I can see your using powershell, does it do the same using standard cmd shell?. If so it's maybe some funky powershell settings rather than node.. – Keith Commented Aug 22, 2021 at 10:37
  • Did you save your file? – Nick Parsons Commented Aug 22, 2021 at 10:55
Add a ment  | 

2 Answers 2

Reset to default 5

turned out that the problem was i did not save the file, if your having the same issue please try to save before runing.

run the file with .js extensions your run only with filename node app

try to run node app.js

Post a comment

comment list (0)

  1. No comments so far