-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: TypeError: Cannot read properties of undefined (reading '0') at LessParser.interpolation #378
Comments
I have the same issue, any solution ? |
@ota-meshi I had created a reproduce repository |
What's your vscode version? My Version is:
My Stylint config in settings.json: "stylelint.validate": [
"css",
"less",
"scss"
], 2022-08-31.11.19.54.mov |
I don't have your environment so I can't fix it. Could you please debug the issue and submit a PR that fixes the issue? |
I try to fix the issue yesterday, but can't find out how to debug the lsp extension. I'm not familiar with lsp extension. But I will study some lsp knowledge and try to fix again these days.
|
I fix the server debug config: #421, and find this message is from here: The error message is:
Seems like just a parse syntax error. Should we just ignore the error? |
What is the difference from running from the CLI? |
|
Your problem may not be a vscode-stylelint issue. I think it's |
I'm closing this issue as I don't think the issue is with vscode-stylelint. |
i have met the same problem |
How did you encounter this bug?
[email protected]:tjx666/stylelint-issue-repro.git
pnpm install
index.less
.
Code Snippet
Just input
.
:Stylelint Configuration
Extension Configuration
None
Actual Behaviour
Expected Behaviour
No error notification.
Logs
[Info - 10:43:31 AM] [language-server] Registering module | module: "auto-fix"
[Info - 10:43:31 AM] [language-server] Module registered | module: "auto-fix"
[Info - 10:43:31 AM] [language-server] Registering module | module: "code-action"
[Info - 10:43:31 AM] [language-server] Module registered | module: "code-action"
[Info - 10:43:31 AM] [language-server] Registering module | module: "completion"
[Info - 10:43:31 AM] [language-server] Module registered | module: "completion"
[Info - 10:43:31 AM] [language-server] Registering module | module: "formatter"
[Info - 10:43:31 AM] [language-server] Module registered | module: "formatter"
[Info - 10:43:31 AM] [language-server] Registering module | module: "old-stylelint-warning"
[Info - 10:43:31 AM] [language-server] Module registered | module: "old-stylelint-warning"
[Info - 10:43:31 AM] [language-server] Registering module | module: "validator"
[Info - 10:43:31 AM] [language-server] Module registered | module: "validator"
[Info - 10:43:31 AM] [language-server] Starting language server
[Info - 10:43:31 AM] [language-server] Registering handlers
[Info - 10:43:31 AM] [language-server] Handlers registered
[Info - 10:43:31 AM] [language-server] Language server started
[Error - 10:43:48 AM] [language-server] Error running lint | uri: "file:///Users/yutengjing/Library/Application%20Support/Adobe/CEP/extensions/ae-power-tools/web/a.less" error: {"name":"TypeError","message":"Cannot read properties of undefined (reading '0')","stack":"TypeError: Cannot read properties of undefined (reading '0')\n at LessParser.interpolation (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/nodes/interpolation.js:9:45)\n at LessParser.atrule (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:22:33)\n at LessParser.mixin (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:145:10)\n at LessParser.unknownWord (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:204:12)\n at LessParser.other (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss/lib/parser.js:151:12)\n at LessParser.other (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:157:13)\n at LessParser.parse (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss/lib/parser.js:59:16)\n at parse (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/index.js:13:12)\n at new LazyResult (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss/lib/lazy-result.js:133:16)\n at getPostcssResult (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/stylelint/lib/getPostcssResult.js:77:30)"}
[Error - 10:43:51 AM] [language-server] Error running lint | uri: "file:///Users/yutengjing/Library/Application%20Support/Adobe/CEP/extensions/ae-power-tools/web/a.less" error: {"name":"TypeError","message":"Cannot read properties of undefined (reading '0')","stack":"TypeError: Cannot read properties of undefined (reading '0')\n at LessParser.interpolation (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/nodes/interpolation.js:9:45)\n at LessParser.atrule (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:22:33)\n at LessParser.mixin (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:145:10)\n at LessParser.unknownWord (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:204:12)\n at LessParser.other (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss/lib/parser.js:151:12)\n at LessParser.other (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/LessParser.js:157:13)\n at LessParser.parse (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss/lib/parser.js:59:16)\n at parse (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss-less/lib/index.js:13:12)\n at new LazyResult (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/postcss/lib/lazy-result.js:133:16)\n at getPostcssResult (/Users/yutengjing/Library/Application Support/Adobe/CEP/extensions/ae-power-tools/node_modules/stylelint/lib/getPostcssResult.js:77:30)"}
Stylelint Version
14.4.0
vscode-stylelint Version
v1.2.2
Node.js Version
v16.13.2
Operating System
MacOS12.2
Windows Subsystem for Linux
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: