You need to sign in to do that
Don't have an account?
raSFUser
Create a Hello World Lightning Web Component (Deploy Error)
I am currently trying to complete the trailhead 'Create a Hello World Lightning Web Component' section where you deploy the lightning web component from VSCode to your org, and im hitting the below error.
Starting SFDX: Deploy Source to Org 18:12:03.382 sfdx force:source:deploy --sourcepath c:\Users\ravent\Documents\SFDX Projects\HelloWorldLightningWebComponent\force-app\main\default --json --loglevel fatal 18:12:07.153 sfdx force:source:deploy --sourcepath c:\Users\ravent\Documents\SFDX Projects\HelloWorldLightningWebComponent\force-app\main\default --json --loglevel fatal ended with exit code 1 sf:UNSUPPORTED_API_VERSION: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL
As far as i can see i have followed the instructions to the letter, and cant seem to correct the error.
Any suggestions would be greatly appreachiated.
worked it out, for anyone else seing this issue run the below command in CLI:
sfdx force:config:set apiVersion=45.0 --global
Also make sure that your project json is set:
sfdx-project.json
And that the example helloWorld xml api element provided also matches:
helloWorld.js-meta.xml
All Answers
worked it out, for anyone else seing this issue run the below command in CLI:
sfdx force:config:set apiVersion=45.0 --global
Also make sure that your project json is set:
sfdx-project.json
And that the example helloWorld xml api element provided also matches:
helloWorld.js-meta.xml
I do not see the Component in the Default org later to add to the App builder .
Starting SFDX: Deploy Source to Org
00:19:34.851 sfdx force:source:deploy --sourcepath /Users/admin/Documents/Documents/HelloWorldLightningWebComponent/force-app/main/default --json --loglevel fatal
00:20:31.407 sfdx force:source:deploy --sourcepath /Users/admin/Documents/Documents/HelloWorldLightningWebComponent/force-app/main/default --json --loglevel fatal ended with exit code 0
=== Deployed Source
STATE FULL NAME TYPE PROJECT PATH
───── ────────────────────────── ──────────────────────── ────────────────────────────────────────────────────────────
Add helloWorld/helloWorld.html LightningComponentBundle force-app/main/default/lwc/helloWorld/helloWorld.html
Add helloWorld/helloWorld.js LightningComponentBundle force-app/main/default/lwc/helloWorld/helloWorld.js
Add helloWorld/helloWorld.js LightningComponentBundle force-app/main/default/lwc/helloWorld/helloWorld.js-meta.xml
Any suggestions to set this correct is highly appreciated .
Thanks
Shilpa
To everyone who faced the same issue, the above message on the console of the Visual Studio Code is not an error. When you open the org and go to Edit the Page via Settings, all you have to do is look for helloWorld in the Components section under Custom
I enabled Dev Hub on my SFDC org and then my issue was fixed