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
Emilien Guichard 51Emilien Guichard 51 

Trailhead “Access Salesforce Data with Lightning Web Components Open Source” stuck in module Connect to Salesforce"

Hello there,

Not sure if anybody you can help here but I 'm having an issue with the new trailhead project "Access Salesforce Data with Lightning Web Components Open Source".

In the last module "Connect to Salesforce" in the index.js file VS Code has an error saying that variable process (in process.env) is not defined.

I understand that is has to do with node.js but I can't figure that out.

Thanks a lot if you have a look.
Have a good day.
Suraj Tripathi 47Suraj Tripathi 47
Hi Emilien,
 
"your problem solution is here"
Firstly you have to create a new file and the name of the file is:-“NameOfFile.env”. Replace the below information with your org details. 
Save this file in root folder and also remember one things that your structure of folder is in perfect manner.

SF_LOGIN_URL=https://login.salesforce.com
SF_USERNAME=YOUR_USERNAME
SF_PASSWORD=YOUR_PASSWORD
SF_TOKEN=YOUR_SECURITY_TOKEN

-----------------------------------------------------------------------------------------------------------
If you find your Solution then mark this as the best answer. 

Thank you!

Regards 
Suraj Tripathi