Closed citrusui closed 8 years ago
Does it occur after re-installing linter-htmlhint
?
First look, it seems to be broken.
Yep, reinstalled it and the same error.
Try uninstalling linter
as well as linter-htmlhint
, then install linter-htmlhint
apm uninstall linter linter-htmlhint
apm install linter-htmlhint
You can easily reload Atom with Ctrl + Opt + Cmd + l.
I just unloaded and reloaded all of the linter
packages and I'm not seeing this error.
Same error here.
Error: C:\Users\Alberto.atom\packages\linter-htmlhint\node_modules.bin\htmlhint:4 case uname in ^^^^
SyntaxError: Unexpected token case at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:413:25) at Object.Module._extensions..js (module.js:452:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:475:10) at startup (node.js:129:18) at node.js:981:3
Error: C:\Users\Alberto\.atom\packages\linter-htmlhint\node_modules\.bin\htmlhint:4
case `uname` in
^^^^
SyntaxError: Unexpected token case
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:129:18)
at node.js:981:3
at parameters.exit (C:\Users\Alberto\.atom\packages\linter-csslint\node_modules\atom-linter\lib\helpers.js:75:20)
at triggerExitCallback (C:\Users\Alberto\AppData\Local\atom\app-1.4.0\resources\app.asar\src\buffered-process.js:213:47)
at ChildProcess.<anonymous> (C:\Users\Alberto\AppData\Local\atom\app-1.4.0\resources\app.asar\src\buffered-process.js:235:18)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
@AlbertoFdzM Would you try to reinstall following above the @johnwebbcole's comment?
@1000ch I've tried that but still having the error.
More info:
Can you run htmlhint from the command line?
C:\Users\Alberto\.atom\packages\linter-htmlhint\node_modules\.bin\htmlhint
Done:
C:\Users\Alberto\.atom\packages\linter-htmlhint\node_modules\.bin\htmlhint index.html
Scan 1 files, without errors (15 ms).
Is this only on Win? I'm not seeing this on OS X, I'll find a windows box and see if I get the same error.
Win10 same error (reinstalled linter and linter-htmlhint).
I can confirm the error on Win10 even after reinstalling
@1000ch i think problem somewhere in this commit (rewrite) https://github.com/AtomLinter/linter-htmlhint/commit/7fa5d8cf3e095ab0b14b5ab56735d856195235d6
@arturparkhisenko if you run the following does the issue go away?
apm uninstall linter-htmlhint
apm install linter-htmlhint@0.2.2
@Arcanemagus I was getting this error on my w10 then I ran this and it's working again.
@Arcanemagus I had the same error. When I return to 0.2.2 version, the error disappeared. Thanks!
ps win7; node5.4.1; npm 3.3.12
@Arcanemagus I can confirm that installing linter-htmllint@0.2.2 on Windows 10, remove the error.
@Arcanemagus yep!
@Arcanemagus Can confirm installing linter-htmllint@0.2.2 removes the error.
I just got a big red error after upgrading as well:
Error: C:\Users\garret.atom\packages\linter-htmlhint\node_modules.bin\htmlhint:4 case uname in ^^^^
SyntaxError: Unexpected token case at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:413:25) at Object.Module._extensions..js (module.js:452:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:475:10) at startup (node.js:129:18) at node.js:981:3
I'm having the same problem after upgrading on Windows (Windows 7, Atom 1.4, linter-htmlhint 1.0.0).
However, I'm also using Atom with the same configuration (through the sync-settings package) on another computer running Linux and everything is working fine. (Ubuntu 14.04 LTS, Atom 1.3.2, linter-htmlhint 1.0.0)
Any progress on this?
hello,the error is happening in the call to execNode in file lib/index.js line 60. Using the method exec instead of execNode fixes the issue on a windows 10 system. index.txt. Sorry I'm in hurry and don't want to fork now. The difference is that atom-linter is using a BufferedProcess instead of a BufferedNodeProcess for calling htmlhint by using the method.
Wow, that definitely sounds like the issue, thanks for taking the time to trace that down @AnWeber.
@1000ch can you put a fix in for that?
OK. I've just got a Windows 10 today, I'll try to debug this.
@AnWeber Thanks! I tested it on Win10x64pro and it's works perfectly :+1:
Awesome! Will anybody make a PR for this?
↑ I'll fix this, thank you for debugging @AnWeber !
Please try v1.0.1
.
@1000ch all fine :100: thanks!
@arturparkhisenko Thank you for quick reply :+1:
I just updated to v1.0.1 and when saving I get:
Error: 'node' is not recognized as an internal or external command, operable program or batch file.
Error: 'node' is not recognized as an internal or external command,
operable program or batch file.
at parameters.exit (C:\Users\garret\.atom\packages\linter-htmlhint\node_modules\atom-linter\lib\helpers.js:75:20)
at triggerExitCallback (C:\Users\garret\AppData\Local\atom\app-1.4.0\resources\app.asar\src\buffered-process.js:213:47)
at C:\Users\garret\AppData\Local\atom\app-1.4.0\resources\app.asar\src\buffered-process.js:227:18
at Socket.<anonymous> (C:\Users\garret\AppData\Local\atom\app-1.4.0\resources\app.asar\src\buffered-process.js:98:18)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
@garretwilson nodejs is installed? i have installed, maybe that's why i can't get this error
@1000ch Works fine here too! (Win10 Pro 11099)
Thanks for the quick fix! :+1:
No, I don't have Node installed other than whatever Atom uses behind the scenes. Your plugin shouldn't require it.
maybe that's why i can't get this error
Well, there's one way for you to find out: uninstall Node and try it.
@garretwilson @1000ch agree with that! Already tested: i got this error without nodejs too!
I think I have found the right way to fix this issue. The path to the htmlhint executable was wrong. I tested this fix on a win10 machine without nodejs:-). Sorry for the previous invalid fix attempt. This fix did just workaround the invalid path. Before releasing, this fix should be tested on a none windows machine.
v1.0.2 is published which should remove the node requirement, please file a new issue if you are continuing to have problems :wink:.
Every time I press save or click CTRL+S to save a document, this pops up. Don't know why. It didn't happen to me in the previous version of
linter-htmlhint
.