mihai-vlc / sublime-jsfmt

jsfmt plugin for Sublime Text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: 'node' is not recognized as an internal or external command

congson95dev opened this issue · comments

commented

hi . i have an trouble , why this appear in console and how to fix it?

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

it appear when i set auto format : on , and try to save javascript code
thanks

Can you please ensure that the path to the nodejs executable file is configured in your settings

{
    "node-path": "node"
}

You should find that under Preferences > Package settings > Sublime JSFMT > Settings – User

you can use settings default as an example

Please reopen the ticket if this doesn't fix your issue.

commented

{ "autoformat": true, "node-path": "node", }
i do this but still not working .. same problem still appear.

for the node-path parameter can you try to add the full path to the node executable file ?

commented

hmm .. i added everything from default to user but still not work

`{
// autoformat on save
"autoformat": true,

// array of extensions for autoformat
"extensions": ["js", "sublime-settings"],

// options for jsfmt
"options": {
    "preset": "jquery",
    "indent": {
        "value": "    "
    },
    // plugins included
    "plugins": [
        // "esformatter-quotes",
        // "esformatter-semicolons",
        // "esformatter-braces",
        // "esformatter-dot-notation"
    ]
},
"options-JSON": {
    "plugins": [
        "esformatter-quotes"
    ],
    "quotes": {
        "type": "double"
    }
},
"node-path": "node",
"alert-errors": true,
"ignore-selection": false

}`

The absolute path to your node executable file should be something like: C:/Program Files/nodejs/node.exe

commented

doesn't seem like i have it C:/Program Files/nodejs/node.exe

Maybe you haven't installed nodejs yet ?
https://nodejs.org/en/