I can get jshinter working on windows
Closed this issue · 3 comments
I'm running latest node version ( 0.8.1 ), i downloaded the package and put it in a directory.
I installed express and jade and so in jshintr folder i have a node_module directory which holds both packages. i start node app.js and the server starts. I tried to access files directly bypassing apache and so i tried to connect to
which gives me back
File could not be found
Sorry brah, we couldn't find the file at C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr/views/sadface.jade
so i went to line 34 and replaced
var filename = ( '/' + req.query.file).replace(/hint$/, '');
with
var filename = ( req.query.file).replace(/hint$/, '');
And then tried again (after restartin app.js) and got
C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr\lib\hasher.js:11
errorLineContents = source.split("\n")[error.line - 1],
^
TypeError: Cannot read property 'line' of null
at C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr\lib\hasher.js:11:53
at module.exports.passed (C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr\lib\hinter.js:131:20)
at Array.forEach (native)
at hintCode (C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr\lib\hinter.js:130:19)
at module.exports.passed (C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr\lib\hinter.js:154:20)
at Array.forEach (native)
at C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr\lib\hinter.js:148:14
at C:\Program Files (x86)\Zend\Apache2\htdocs\wordpress\wp-content\plugins\all-in-one-event-calendar\app\view\admin\js_development\jshintr\app.js:49:16
at fs.readFile (fs.js:176:14)
at Object.oncomplete (fs.js:297:15)
what am i doing worng?
jshintr was never designed to be run on Windows - and at the same time, it was a quick prototype I wrote over a year ago. Node.js has changed significantly since then. If you do get it working with latest node, send me a pull request & I'd be happy to merge your changes in to master.
master has been updated currently works with the following versions of libraries (does not work with the 3.0 betas of express).
node version: 0.8.1
├─┬ express@2.5.11
│ ├─┬ connect@1.9.1
│ │ └── formidable@1.0.11
│ ├── mime@1.2.4
│ ├── mkdirp@0.3.0
│ └── qs@0.4.2
└─┬ jade@0.26.3
├── commander@0.6.1
└── mkdirp@0.3.0
Thank you very much :)