SublimeJSCSFormatter icon indicating copy to clipboard operation
SublimeJSCSFormatter copied to clipboard

jscs and nodenv.

Open chyzwar opened this issue 8 years ago • 3 comments

I am using nodenv. Below my config.

{

  "node_path": {
    "linux": "/home/raziel/.nodenv/shims/node",
  },

  "jscs_path": {
    "linux": "/home/raziel/.nodenv/shims/jscs",
  },


  "config_path": "",

  "format_on_save": false
}
$ which jscs
/home/raziel/.nodenv/shims/jscs
$ which jscs
/home/raziel/.nodenv/shims/jscs

When I try to format I get (in sublime console):

error: Error: /home/raziel/.nodenv/shims/jscs:3
[ -n "$NODENV_DEBUG" ] && set -x
     ^^^^^^^^^^^^^^^

SyntaxError: Unexpected string
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:430:10)
    at startup (node.js:141:18)
    at node.js:1003:3

chyzwar avatar Jan 11 '16 21:01 chyzwar

I fixed this buy changing a path:

{

  "node_path": {
    "linux": "/home/raziel/.nodenv/shims/node",
  },

  "jscs_path": {
    "linux": "/home/raziel/.nodenv/versions/5.4.0/bin/jscs",
  },

  "config_path": "",

  "format_on_save": true
}

Problem still stays. It should be possible to use /home/raziel/.nodenv/shims folder.

chyzwar avatar Jan 23 '16 21:01 chyzwar

What happens when you try to run /home/raziel/.nodenv/shims/jscs from the command line?

TheSavior avatar Jan 23 '16 22:01 TheSavior

selection_0024

chyzwar avatar Jan 23 '16 22:01 chyzwar