Select your Language

LWC1702: Invalid LWC imported identifier "createElement"

 Whenever user tries to deploy the LWC component then some time got the below error

LWC1702: Invalid LWC imported identifier 'createElement" 

we got this error because  LWC Jest unit testing in our repo means when we create any new LWC then new  __tests__ file is auto-added in the LWC repo.

Hence we can resolve this error by adding the below test in the .forceignore file which will be found in the project repo.

**/__tests__/** 


After add the text save the file and deploy again then not got the deployment erro again :)

No comments:

Post a Comment