csscomb / sublime-csscomb

Sublime plugin for CSScomb—CSS coding style formatter
398 stars 61 forks source link

node.js path #10

Closed kdsingharneja closed 9 years ago

kdsingharneja commented 10 years ago

I am getting the error "node is not recognized as ..."

I can't seem to find where this node's path will go? I have node.js installed

tonyganch commented 10 years ago

Can you give the whole error message please? What do you do before you get it? Where do you see this error? What is logged in ST console? (you can open it by pressing ctrl + `)

getsetbro commented 10 years ago

" Traceback (most recent call last): File "/Users/me/Library/Application Support/Sublime Text 3/Packages/CSScomb JS/CSScomb.py", line 44, in comb env=self.get_env(), shell=self.is_windows()) File "X/subprocess.py", line 818, in init File "X/subprocess.py", line 1416, in _execute_child FileNotFoundError: [Errno 2] No such file or directory: 'node'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublimeplugin.py", line 549, in run return self.run(edit) File "/Users/me/Library/Application Support/Sublime Text 3/Packages/CSScomb JS/CSScomb.py", line 36, in run combed = self.comb(originalBuffer, syntax, config_path) File "/Users/me/Library/Application Support/Sublime Text 3/Packages/CSScomb JS/CSScomb.py", line 47, in comb '$PATH by running node -v in your command-line.') Exception: Couldn't find Node.js. Make sure it's in your $PATH by running node -v in your command-line. "

FYI, my other sublime-text-3 packages have found and are using node and it is version v0.10.26.

getsetbro commented 10 years ago

I fixed it by installing node with homebrew so it goes into usr/local. NVM does not put it there.

awbcollier commented 10 years ago

Hello,

I am having the same issue. I installed both nodejs and Javascript & nodejs packages. The total message reads:

error: CSScomb error: 'node' is not recognized as an internal or external command, operable program or batch file.

I don't know how the above person solved the issue. I don't know if it causes an issue, but on my computer it has installed the nodejs package into the below directory:

C:\Users\Alastair\AppData\Roaming\Sublime Text 3\Installed Packages\Nodejs.sublime-package

Any help greatly appreciated as you have a great little add on for SublimeText. I am using SublimeText 3

getsetbro commented 10 years ago

I think instead of having NodeJS (the platform) installed on windows (into the program files folder) you only have a sublime package called Nodejs added to sublime. If you install NodeJS (the platform) from here then sublime and sublime packages can use it: http://nodejs.org/download/ Install that and see if CSScomb can run.

Anima-t3d commented 10 years ago

@getsetbro I installed from nodejs.org and get same error. I'm using ST2 portable.

Anima-t3d commented 10 years ago

@getsetbro After I installed node.js I checked if node was successfully installed and it was, but the error in ST2 portable when trying to run csscomb still persisted. However after reboot it gave a different error (I'm working with sass in .scss files). I changed the syntax type from css to scss and now it works!

awbcollier commented 10 years ago

Ah ok, I installed the windows platform as you suggested and now it works perfectly. I miss-understood about how to install node.js. Many thanks!

asakasinsky commented 9 years ago

Add node path to config, please

AoDev commented 9 years ago

Same @asakasinsky , please add path to the config. Thanks for the plugin :+1:

tonyganch commented 9 years ago

You can now set custom path to node in settings: https://github.com/csscomb/sublime-csscomb/blob/master/CSScomb.sublime-settings#L4

asakasinsky commented 9 years ago

Thank you!

CLaBruno commented 9 years ago

I am having the same issue with CSS Comb. I added my Node path in the settings like so:

"node-path" : "C:/Program Files (x86)/nodejs/node",

And I added the path in my system variables as well:

C:\Program Files (x86)\nodejs

When I go to run CSS Comb I am still getting the error:

CSScomb error: 'node' is not recognized as an internal or external command, operable program or batch file.

Any more suggestions?

ghost commented 9 years ago

Help please same error above.

getsetbro commented 9 years ago

@blagodat88 what system are you using and how did you install nodejs?