Closed mattdesl closed 4 years ago
Usually that occures when there is a syntax error but maybe something changed. @Flet any ideas?
I've been getting similar the last few days, I'm on standard-format@2.1.1 and get the error even when the only contents of the file are basic and valid eg.
var foo = 1;
Please let me know if I can give more information to help debug. Sublime's console just writes "standard-format: error formatting selection(s)"
Downgrading to npm i -g standard-format@2.0.0
fixed it for me.
/cc @bcomnes @mattdesl
I'm getting this even with standard-format@2.0.0.
If you're having this problem, you can get a more informative error message by opening the console in Sublime (View --> Show Console) and setting "log_errors": true in the personal Standard.sublime_settings
In case it helps someone else, on Windows 10, I was getting an error about node not being a recognised executable and needed to add the node path (C:\Program Files\nodejs) to my users path variable, just being on the global path was not enough
Here is what I'm getting with this problem.
StandardFormat: error formatting selection(s)
b"standard: Use JavaScript Standard Style (http://standardjs.com)\nstandard: <text>:2:3: 'angular' is not defined.\nstandard: <text>:18:14: '_' is not defined.\nstandard: <text>:18:24: '_' is not defined.\nstandard: <text>:23:11: '_' is not defined.\nstandard: <text>:51:11: '_' is not defined.\nstandard: <text>:63:7: '_' is not defined.\nstandard: <text>:64:9: '_' is not defined.\nstandard: <text>:71:11: '_' is not defined.\nstandard: <text>:81:14: '_' is not defined.\nstandard: <text>:90:9: '_' is not defined.\nstandard: <text>:96:14: '_' is not defined.\nstandard: <text>:115:14: '_' is not defined.\n"
error: StandardFormat: error formatting selection(s)
Using node.js path on 'osx': /usr/local/bin/node
I have those in my package.json file under standard/globals.
I switched my user config file to
{
"log_errors" : true,
"commands": [
["standard-format", "--stdin"]
]
}
Disabling the standard --fix
And its working again.
I think this is related to #38; I’m seeing the same issue using standard --fix --stdin
.
FYI, for those using semistandard
, this works:
"commands": [
["semistandard-format", "--stdin"]
],
Stale. Please reopen a new issue with specifics on reproduction if you are still having issue.
Lately I've been getting this error in console when using
semistandard-format
Settings:
Works fine with
standard-format
. Not sure if I should open an issue insemistandard-format
. Strangely it used to work fine, so I'm not sure how things have changed.