function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Simon GuillenSimon Guillen 

Setting up Jest Framework

Hi, I followed this trailhead (https://trailhead.salesforce.com/content/learn/modules/test-lightning-web-components/set-up-jest-testing-framework) and upon running this line:
sfdx force:lightning:lwc:test:setup

I get the following error:
 
npm command not found. Verify npm is properly installed and try again.

I already installed npm and node on my computer as evidenced when I type these:
 
D:\Workspace\Personal\etrs-migration>node --version
v12.14.0

D:\Workspace\Personal\etrs-migration>npm --version
6.13.4

I couldn't find solutions when I searched from Google, has anyone encountered this issue like I have right now?
ANUTEJANUTEJ (Salesforce Developers) 
Hi Simon,

I found the below links wherein they faced a similar issue and reinstalling helped them can you try checking these links:

>> https://github.com/forcedotcom/lwc-dev-server-feedback/issues/35

>>https://salesforce.stackexchange.com/questions/308672/sfdx-forcelightninglwctestrun-not-working

>>https://developer.salesforce.com/forums/?id=9062I000000IEleQAG

I hope they help with your error.

Regards,
Anutej
ManiKumar Gunda 10ManiKumar Gunda 10
Hi Simon,
I am also facing same issue. Could you please let me know if it is resolved