-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install instruction on windows 7? #14
Comments
Hi. To use this plugin you only need to have a jsbeautifier. I honestly did not check how it works on Windows, try to fix it. P.S. If it is not difficult to write a version of the node and vim. Thanks! |
Thanks for your promptly reply. Here's my vim version: and node.js version: One more thing, I installed "vim-jsbeautify" through Pathogen. |
Thank you!! I'll try to fix it as soon as free time. :) |
The plugin works for me in Windows8. The error looks more node.js related than something from the plugin. The 'home directory' in the error is probably trunked at the space character in the directory name so the symlink doesn't solve that. You can try also this: |
Thanks for your kindly help but I still have the same error. I set the environment variable "NODE_PATH" like "C:\Users\Gilbert Wong\AppData\Roaming\npm\node_modules" |
@gilbertwyw hello! |
Sorry, no.
where I have the following in the PATH
It's my office PC and someone else set it up like this. node --version
I'm really not familiar with Windows environment but I have to use it in the office. Thanks for your help. |
By the way as an option you can try v8 instead nodejs :) |
The statement in beautify.js:
Doesn't fare so well on Windows based systems. It's an easy fix, though, if replaced with a check for indexOf(":/") or the like. Not important, but FYI for any other Windows users out there who get the require() problem |
Thanks for the tip! I think I need to find the time and see what is happening on the Windows :) |
Basically, what's happening is you're checking if it's a absolute path by seeing if the first character is a /. That works fine on Unix, since all absolute paths start with a "/", e.g. /home/user, /var/www, etc. On Windows, they start with a protocol or drive, such as C:\Users\user, D:\something, etc. So it's probably more safe to check if the second character is a column. Either way, for Windows peeps, it's an easy fix if they want to just change it on their local version |
Sorry for taking so long to reply. But it's my office PC and it's been reinstalled (which i need to setup vim & this plugin again) so I need some time to see if the problem's still there. Thanks to both of you guys for taking time to look into the issue. |
I ran into this problem as well, so I went ahead and fixed this in my own fork. It seems to be working correctly on my Windows 7 workstation at work, but I won't be able to test it on OS X or Linux at home until later tonight or next week. Maksim, would you like a pull request for the fix after I can confirm I didn't break anything? Thanks for an awesome plugin! :) |
Wow! Yes! Thank you very much!!! 👍 |
Yep, @edmistond has the same fix I have to make it work on Windows based file systems, so there's a +1 to testify it works. Thanks @edmistond ! |
Do I need to install any node module in order to use this plugin?
I got the follow error when i format the code:
module.js:340
throw err;
^
Error: Cannot find module 'C:\Users\Gilbert'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
My "home" should be 'C:\Users\Gilbert Wong' instead.
And I've tried to symlink to just 'Gilbert' but didn't work.
BTW, in the source it seems "vimfiles/" is not one of the places the ".editorconfig" will be looked for. Any plan to support this?
Please help. Thanks.
The text was updated successfully, but these errors were encountered: