Checking multiple files with JSHint 1.1.0 and Rhino fails #931

Closed
ralfstx opened this Issue Mar 17, 2013 · 2 comments

Projects

None yet

3 participants

@ralfstx
ralfstx commented Mar 17, 2013

Checking multiple files with jshint 1.1.0 using rhino fails with the exception below. Apparently, this happens only with 3 or more files.

rhino jshint-rhino-1.1.0.js file1.js file2.js file3.js
js: "<eval'ed string>#1(Function)", line 105: uncaught JavaScript runtime exception: ReferenceError: "console" is not defined.
    at <eval'ed string>#1(Function):105
    at <eval'ed string>#1(Function):3347
    at <eval'ed string>#1(Function):3346
    at <eval'ed string>#1(Function):69
    at <eval'ed string>#1(Function):3354
    at <eval'ed string>#1(Function):3353

Faking a console object helps to avoid this exception. Is this a safe fix or does it only shadow a severe problem?

@levsa
levsa commented Mar 25, 2013

I have the same problem. Is there a better fix than faking a console object?

@valueof valueof closed this in 00b0775 Mar 25, 2013
@levsa
levsa commented Mar 25, 2013

This fix doesn't seem to help all the way. I get window is not defined errors instead:

js: "jshint-rhino-cs-1.1.0.js#240(Function)", line 14: uncaught JavaScript runtime exception: ReferenceError: "window" is not defined.
at build/resources/main/jshint-rhino-cs-1.1.0.js#240(Function):14 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js:187 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js:13 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js:162 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js#267(Function):47 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js:187 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js:13 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js:269 (anonymous)
at build/resources/main/jshint-rhino-cs-1.1.0.js:6

@valueof valueof reopened this Mar 28, 2013
@valueof valueof referenced this issue Mar 28, 2013
Closed

Withcs #966

@valueof valueof added a commit that closed this issue Apr 8, 2013
@valueof valueof Upgrade Browserify to 2.12.0
This should improve performance on Rhino and resolve EventEmitter
leaks.

Closes GH-983.
Closes GH-958.
Closes GH-931.
Closes GH-889.
Affects GH-987.
f2843c5
@valueof valueof closed this in f2843c5 Apr 8, 2013
@jugglinmike jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
@valueof valueof Fake console API for Rhino and IE; closes GH-931 2c03a82
@jugglinmike jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
@valueof valueof Upgrade Browserify to 2.12.0
This should improve performance on Rhino and resolve EventEmitter
leaks.

Closes GH-983.
Closes GH-958.
Closes GH-931.
Closes GH-889.
Affects GH-987.
d54e023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment