-
Notifications
You must be signed in to change notification settings - Fork 84
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
Error: LWC1702: lwc => import {createElement} from 'lwc'; seems to be broken? #350
Comments
Thanks for reporting!
Questions:
|
Yes that's what I meant, sorry if that wasn't clear. It's in all the Jest test files, following the example of tests given by Salesforce or other GitHub repos.
I don't have a specific cause for the issue unfortunately, I am part of multiple repositories, all running different versions of sfdx-lwc-jest. Could've been perhaps related to an update of the ESLint plugin?
Enjoying my "error-less" files :) It's not blocking anything, but it's just annoying. // @ts-ignore |
Adding that I also see this highlight in VSCode with sfdx-lwc-jest 4.0.1, even though running I did try updating our
but that didn't resolve the issue. |
Thanks for the confirmation. So it sounds like this might actually be an issue purely in the VS Code Extension? It sounds like you are just seeing a red squiggly in the VS Code UI, but you can't actually reproduce the ESLint error by running If that's the case, then this may have been due to a change in lightning-language-server (which the VS Code extension uses). |
@nolanlawson perhaps, do you have any idea to try to hide this? |
Based on the description above, I am closing this issue in favor of an issue on New issue: forcedotcom/lightning-language-server#588 |
Description
VSCode is just showing a cryptic error
on the line
import {createElement} from 'lwc';
where it wasn't before?It looks like I can change it to
import {createElement} from '@lwc/engine-dom';
but I'm afraid it might cause other issues?Steps to Reproduce
Even in the lwc-recipe repository I am having this error.
Expected Results
No errors I guess?
Actual Results
Version
The import in the jest files seems to resolve to this
.d.ts
from the.sfdx
folder that gets created every time I run a sf command from inside the project for instance.The text was updated successfully, but these errors were encountered: