Closed thenewvu closed 5 years ago
I get the following similar error:
(node:2323) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'is' of null
(node:2323) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
node v7.10.0 OSX 10.11.6
Same error here
node 7.10.0
OSX 10.10.5
Similar error when running csscomb@4.0.1 as an exec command with ant. Like @thenewvu, no error with version 3.1.7:
csscomb:
[exec] (node:66140) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: this._parseString(...).then is not a function
My env:
Apache Ant 1.9.7
node 6.10.2
macOS 10.12.4
Getting error in Atom Beautify 0.29.26 which uses CSS Comb. How to resolve?
TypeError: ast.remove is not a function
at /Users/jw/.atom/packages/atom-beautify/node_modules/csscomb/lib/options/block-indent.js:48:13
at Node.eachFor (/Users/jw/.atom/packages/atom-beautify/node_modules/gonzales-pe/lib/gonzales.js:129:83)
at Object.process (/Users/jw/.atom/packages/atom-beautify/node_modules/csscomb/lib/options/block-indent.js:44:9)
at /Users/jw/.atom/packages/atom-beautify/node_modules/csscomb/lib/core.js:380:14
at Array.forEach (native)
at Comb._processTree (/Users/jw/.atom/packages/atom-beautify/node_modules/csscomb/lib/core.js:379:8)
Temporary workaround: Remove "block-indent": " ",
from the .csscomb.json
file and the error ceases to appear and ceases to block the rest of the formatting. That means no indenting of blocks until fixed, but still better than no formatting at all.
Is it this line of code that is failing? https://github.com/csscomb/csscomb.js/blob/dev/src/options/block-indent.js#L48
Is nobody maintaining this?
@janwerkhoven I do maintain this repository. I will look into this asap.
Should this
https://github.com/csscomb/csscomb.js/blob/dev/src/options/block-indent.js#L48
ast.remove(i);
not be
ast.removeChild(i);
?
I am having the same issue and changing
"eof-newline": false,
to true fixes the fault. Hope that helps finding the issue.
@ryanbowden It works! Thanks.
The fix from @mfeckie worked for me.
Still having this issue in the current version until I make the change @ryanbowden suggested.
Still having issue, @ryanbowden update does'nt work with me :(
Found the issues, cause my style has many lines commented out by //
, Is this a known issue ?
I can confirm both the fix and work-around.
In the .csscomb.json
set "eof-newline": true,
.
Thanks @ryanbowden
In node_modules/csscomb/lib/options/block-indent.js
replace ast.remove(i);
with ast.removeChild(i);
.
Thanks @mfeckie !
Also getting similar error. Node v.8.9.1 & OS High Sierra with latest CSSComb. (node:22596) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): [object Object] (node:22596) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
similar error
.hoge {
$arr: (
"s": 3,
"m": 4,
"l": 5,
) !default;
@each $key, $value in $arr {
"&--of3" { // ← this is bad
}
}
}
(node:110565) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): [object Object]
(node:110565) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Node: v8.7.0 OS: Ubuntu 14.04.5 LTS
Thanks, both fixes work!
@ryanbowden ,It works for me too!
*{
outline: none;
}*
My issue was this last asterisk which was preventing my code to run. Check if you don't have such syntax error because I have tried all the solutions above, but ended up to be that!
UPDATED: watch out for unset comments, if you don't wrap them like this:
color: navy;
background-color: black;
_TOP:
1st top-left; 2nd top-right;
BOTTOM:
3rd bottom-right; 4th bottom-left;_ /*this whole block should be a comment block. This produces this error, too*/
text-shadow: -3px -3px 7px lightblue, 3px -3px 7px lightblue,
3px 3px 7px lightblue, -3px 3px 7px lightblue;
Fixed by @janwerkhoven with #552.
🙌
Sir, I've met this error with all CSS files and with both custom and default configure:
This error only occurs in v4.0.1, not with v3.1.7.
My environment: