Closed danielkcz closed 10 years ago
Can you share the output of the version with just node server.js
for comparison?
Sure...
Calling console.log
Calling console.error
Calling console.log second time - fails
Calling console.error second time - fails
S:\workspace\server.js:5
nonexisting.throwError();
^
ReferenceError: nonexisting is not defined
.....
I had also made post to Stackoverflow just more focused around Coffeescript solution which is somewhat more serious. There is already one answer that could be right.
Can you also paste the output of nodemon --dump server.js
?
S:\workspace>nodemon --dump server.js
18 Mar 23:48:55 - [nodemon] v1.0.15
18 Mar 23:48:55 - [nodemon] to restart at any time, enter `rs`
18 Mar 23:48:55 - [nodemon] watching: *.*
--------------
{ run: false,
system:
{ cwd: 'S:\\workspace',
useFind: false,
useWatch: true,
useWatchFile: false },
required: false,
dirs: [ 'S:\\workspace' ],
timeout: 1000,
options:
{ scriptPosition: 0,
dump: true,
script: 'server.js',
args: [],
ignore:
[ '.git',
'node_modules/**/node_modules',
re: /\.git|node_modules/.*.*/node_modules/ ],
watch: [ '*.*', re: /.*\..*/ ],
restartable: 'rs',
execMap: { py: 'python', rb: 'ruby' },
stdin: true,
verbose: false,
stdout: true,
execOptions:
{ script: 'server.js',
exec: 'node',
nodeArgs: undefined,
ext: 'js',
env: {},
execArgs: [] },
ext: 'js',
monitor: [ '*.*', '!.git', '!node_modules/**/node_modules' ] },
load: [Function],
reset: [Function: reset],
lastStarted: 0,
loaded: [],
command:
{ raw: { executable: 'node', args: [ 'server.js' ] },
string: 'node server.js' } }
--------------
OS: win32 x64
node: v0.10.26
nodemon: v1.0.15
cwd: S:\workspace
command: node D:\users\Fredy\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js --dump server.js
--------------
Got a fix being tested on windows today for this issue.
Fixed in nodemon@1.0.17
Sounds promising, I will check it out, thanks !
Alright, I am not sure if this isn't purely Windows issue and I don't have option to test anywhere else. Given this really simple code:
When I run it directly like
node server.js
it works just fine, all 4 messages are displayed followed by exception details. However runningnodemon server.js
gives me just this:What could be possibly causing this ? It doesn't make any sense... Of course commenting out that last error line displays all messages correctly.
It would not be that big deal, but thing is, that adding Coffeescript to the mix with
nodemon server.coffee
swallows whole exception too (maybe worth another issue submit). I am trying to utilize debug utility to have nice verbose log of what is happening in the app. Currently everything is just blind with no clue where the error occurred.Oh and adding
process.on('uncaughtException', ...
somewhat fixes JS version, but Coffee version is still broken same way :( Not that it's solution I like, I want to handle exceptions on my own, but I am talking mainly about development times here and when something slips out.