Questions tagged [vs-code]

Visual Studio Code is a free source code editor developed by Microsoft for Windows, Linux and macOS. When the "Salesforce Extensions for VS Code" are added it: supports syntax highlighting and intelligent code completion for Apex, Visualforce and Lightning Components; works well with SFDX including with scratch orgs; supports debugging. Git UI is built in. Many other extensions are available.

Filter by
Sorted by
Tagged with
0
votes
1answer
179 views

Invalid decorator usage. Supported decorators (api, wire, track) should be imported from “lwc”

I started working with Lightning Web Components and was doing the Quick Start: Lightning Web Components project, on deploying source to org, I am getting the following error in VS Code output Panel ...
3
votes
2answers
214 views

Don't see option “SFDX: Push Source to Default Scratch Org” in the command palette in VS Code

I have an sfdx project opened in VS Code as workspace folder. I don't see the option for "SFDX: Push Source to Default Scratch Org" in the command palette. Other commands like "SFDX: Refresh SObject ...
0
votes
1answer
82 views

Using SFDX to retrieve the report meta data

I need to check if a field is being used in any of the reports in the org. So I created a sandbox environment and created a manifest project in VScode; then authorized the sandbox org and ran the ...
3
votes
2answers
1k views

How do I retrieve all the code from lightning?

My boss had been muddling through Salesforce by creating custom objects and triggers using the Lightning Web Interface. I want to pull all his work down in VS Code, commit it to git, and continue ...
3
votes
2answers
96 views

Do I really need to install Prettier locally?

Well, I am trying to set up code formatting process in my project and I am following this guide Set Up the Prettier Code Formatter for Salesforce Projects where steps 1 and 2 include installing ...
0
votes
1answer
35 views

Error while creating Heroku pipeline from VSCode

So, I am trying to create Heroku pipeline from VSCode. I ran the command ./setup.sh In my setup.sh file I've set HEROKU_APP_NAME and verified "Usernames or aliases of the orgs you're using" and also ...
2
votes
2answers
836 views

Migrate from Force.com IDE to VScode

We want to migrate from Force.com IDE to VScode. I have some questions around this. Can we use metadata format (src folder) with vscode, if yes than how? if not then, Would migrating to source ...
9
votes
1answer
872 views

Visual representation code coverage in VSCode

As per answer in this post, in order to get code coverage after running test classes from VSCode, we just need to add "-c" for the sfdx test command as below: sfdx force:apex:test:run -c -u myOrg -r ...
0
votes
2answers
134 views

DevHub and Scratch Org command to open project missing username

I have recently installed VS Code and migrated my projects from Eclipse over to VS Code. I'm getting familiarized with the IDE. I've gotten my projects created and authorized and have successfully ...
5
votes
3answers
803 views

SFDX: Is it possible to push to a sandbox from VS Code?

I have successfully connected VS Code and pushed to several different SF environments, including Trailhead, Developer, and Production. But I can't figure out how to push to a sandbox. It looks like ...
1
vote
4answers
3k views

Authorize Org failed in VS Code

I am new in learning lightning web component. I have installed VS Code, salesforce extension pack inside VS code, Salesforce CLI and set environment variable C:\Program Files\Salesforce CLI in my ...
2
votes
2answers
2k views

SFDX - No org configuration found for name

Suddenly vscode stopped working with deploying the class to the sandbox I'm using and throws this message "No org configuration found for name INSTANCE NAME" I tried to create a new project for the ...
1
vote
1answer
806 views

sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations

While deploying code in vsCode from sandbox to production I get the below error sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations As per ...
1
vote
0answers
44 views

VSCode is checking my static resource JS files as if they are LWC

I have some JS files in a static resource. I pulled code from a Production org and converted to DX format for convenience. I am noticing when I open them in VSCode I get errors like "LWC1007: c:\foo\...
0
votes
2answers
329 views

ERROR running force:project:create: Cannot read property 'create' of undefined

I am trying to follow a Trailhead which instructs me to create a SFDX project in VS Code. I've been using VS Code for awhile and all is current. While troubleshooting this issue, I did update my ...
0
votes
1answer
150 views

Missing manifest and package.xml in new project

I've just installed VS Code and am migrating my projects. I don't see an option to delete a project? I created a project without the manifest and package.xml so I can't retrieve the selected metadata ...
10
votes
1answer
3k views

Log to console in a Lightning Web Component

I am attempting to write a Lightning Web Component, but continually run into errors in my Javascript that I can't debug. I've been trying to log my error but when I put console.log() anywhere in the ...
0
votes
1answer
339 views

unzip' is not recognized as an internal or external command

When i run this command in VS Code terminal unzip -o metadata/unpackaged.zip -d metadata i get an error like this unzip' is not recognized as an internal or external command, operable program or ...
1
vote
0answers
120 views

Im not able to see “Authorize an Org” in my command palette

I have installed the Cli and Salesforce Extension pack. Why can I not see "Authorize an org" in my command pallet?
2
votes
1answer
51 views

Update sObjects in .sfdx/typings

I have a VSCode SFDX Project that we use to develop LWCs, and we recently changed some object names in the Org and now I can't upload anything to our Org. I found that there is a command to refresh ...
1
vote
0answers
104 views

Use Semantic Completion with Tabnine in VsCode

Have any of you tried to use TabNine Semantic Completion with VsCode? I tried to use the configuration below but it always crashes. Just want to make those three great tools to work smooth (VsCode, ...
0
votes
1answer
37 views

Salesforce DX Usage with Classic and team work using scratch org

We are currently using Salesforce Classic and we have developers outside of United states using the remote desktops to login to the client machine and then using SF. I have seen the seminars for SFDX,...
1
vote
0answers
190 views

'ENOENT': spawn cmd ENOENT error while authorizing sandbox org in VSCode

Hi I have installed VS Code and salesfoce CLI, extensions also. I have created my first project. When i am tryin to authorize org in it i am getting below error: Starting SFDX: Authorize an Org 14:...
1
vote
1answer
38 views

SFDX cli throwing eslint error

Does anyone have any ideas on how to fix this? It just randomly started happening when using vscode: This is how my current sfdx-project.json file looks like: { "packageDirectories": [ { ...
1
vote
1answer
276 views

VSCode Debug Add Configuration error Cannot read property 'openConfigFile' of undefined

I created a Salesforce project in VSCode and when I try to debug Apex Classes adding a Debug Configuration I get the following error: Cannot read property 'openConfigFile' of undefined I'm using the ...
2
votes
1answer
983 views

How to delete a Lightning Web Component?

I'm trying to delete new Lightning Web Component without any luck. I've tried to find it in Dev Console, but as you know it doesn't support Lightning Web Components yet. Another way I've tried to ...
2
votes
2answers
57 views

Creating a project from sandbox using vscode

We donot have sfdx enabled in our instances. Can I use vscode IDE and create a proejct from sandbox with any of the salesforce extensions. I see the documentation around creating a scratch org, then ...
2
votes
1answer
179 views

Apex Interactive Debugger

Is there a way to set up the Apex Interactive Debugger for VS Code for free in a Developer Edtion org? I'm a little confused on how to get started using this feature. Any guidance would be appreciated....
1
vote
1answer
41 views

Salesforce ORG Development Model Migration

I am just starting out with my first migration using the salesforce org development model in VS Code. I pulled in my project from my sandbox environment and made my changes and deployed my file back ...
0
votes
0answers
107 views

Cannot create a scratch org, getting “ERROR: Cannot read property 'HANDSHAKE' of undefined.”

I followed steps in https://trailhead.salesforce.com/content/learn/projects/set-up-your-lightning-web-components-developer-tools/create-a-lightning-web-component : installed CLI, updated VS Code, ...
2
votes
1answer
170 views

ERROR: Cannot create an AuthInfo instance that will overwrite existing auth data

Background I get this error message: ERROR: Cannot create an AuthInfo instance that will overwrite existing auth data. In the VSCode output panel, when I try and run a unit test: Starting Run ...
11
votes
2answers
10k views

“Java runtime could not be located” when starting VSCode with the Salesforce Extensions

When starting VS Code (v1.21.1) with the VS Code extensions installed (v40.4) I'm getting the error message: Java runtime could not be located. Set one using the salesforcedx-vscode-apex.java.home ...
3
votes
1answer
41 views

How to see sfdx commands processing indicator in VSCode

Is it possible to see some processing/loading indicator when I do sfdx commands in vscode terminal?
3
votes
1answer
2k views

No sfdx-project.json found in the root directory of your open project. Open a Salesforce DX project in VS Code

I'm using VScode for Apex dev. I have logged into Devhub org. and created a scratch org. when I try to execute pallet command: SFDX: Refresh SObject Definitions I'm getting below error. No sfdx-...
4
votes
2answers
4k views

SFDX: create project using manifest not available

I have visual studio code installed in my desktop and updated SFDX to its latest version. However, when I open up the command palette for 'Create project', I am seeing only the following two options ...
0
votes
0answers
73 views

sfdx.force.test.view.refresh not found

Summary When trying to use the integrated test side bar, no tests are being displayed. When clicking on "refresh" an error message is displayed saying "command 'sfdx.force.test.view.refresh' not ...
1
vote
1answer
121 views

ERROR: No AuthInfo found for name [object Object]

Ad the title described, I have the following error: ERROR: No AuthInfo found for name [object Object]. What i did was to install a whole new clean visual studio code, with the related salesforce ...
3
votes
2answers
284 views

How to get custom object fields displaying in code completion in VS Code

I am trying out the VS Code and wondering if it could be possible to display custom object fields while typing an apex code. At the moment the fields are not displayed: But when I take some standard ...
0
votes
1answer
210 views

Salesforce CLI Authorization timeout

I am attempting to setup VS Code with Salesforce CLI. I am experiencing issues when attempting to authorize my Sandbox. When I attempt to authorize, I enter the MyDomain login page address and set ...
2
votes
4answers
741 views

Should the .gitignore include an entry for .vscode when using Git and VSCode

wadewegner has an example .gitignore file with the below content .DS_Store .sfdx .project .salesforce .settings node_modules .idea As part of his sfdx-simple app on GitHub. Should this file include ...
0
votes
0answers
219 views

SFDX VSCode Workspace with Multiple Orgs

I'm working on combining several orgs into a single org. As part of my requirements, until the process is complete, I created some code that syncs up data from the "primary" org back into 3 "legacy" ...
2
votes
0answers
53 views

How to get Twilio for Salesforce Apex API intellisense in VSCode

I have this Twilio package installed (in both environments): Twilio for Salesforce: Production / Sandbox I am using VSCode to build against the Apex Query Library: Example Apex TwilioSF....
2
votes
3answers
2k views

Unable to Retrieve Source from Sandbox

From the VSCode console, I've created a new project with the command: sfdx force:project:create -n Integration --manifest I then authorize a sandbox org with the command: sfdx force:auth:web:login -r ...
1
vote
0answers
425 views

Deploy Source in Manifest to Org - ended with exit code 1 and no response in problem tab

I have a local Salesforce DX project with a package.xml manifest file. The project has been authorised against a fresh developer org. I want to deploy all my local code in one go, so I am using the ...
1
vote
1answer
31 views

plug icon is missing with default org name in vscode

As per the documentation "Change or Open Your Default Org", In vscode, I should see plug icon with the default org name but it disappeared from last few days. Here is the screenshot(stolen from this ...
0
votes
0answers
37 views

Load report-meta directly in production (testLevel problem)

Since in my org we made some (heavy) changes to the custom objects, we also had the need of redoing all the reports (yeey, such luck!) So what I did, was simply to download all the reports locally, ...
4
votes
1answer
247 views

Limitations of Apex Replay Debugger in VS Code

global class Opportunity_EmailService implements Messaging.InboundEmailHandler { public Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email, Messaging.InboundEnvelope env) { ...
1
vote
1answer
407 views

LWC Deployment Errror

I'm trying to create a basic LWC for a Community which would be a button where Community admins could set the button text and the page value it should link to. I don't have any Problems, but when I ...
1
vote
1answer
68 views

Getting an error “There are no entries to pick from” while creating LWC components

I am creating my first LWC component. While doing so When i run create LWC component command and then enter component name then I am getting an another input saying "There are no entries to pick from"...
1
vote
1answer
61 views

lwc PROJECT PATH ERROR Unknown

I'm working on some lwc, using SFDX and VS Code. About mid-day yesterday, I started getting an error when I tried to push to my scratch org. The push attempt took a long time -- like 2 min, and then ...