Closed KevSlashNull closed 2 years ago
In a Lightning Web Component, trying to auto-complete an Apex method inside a project with namespace, leads to the following auto-completion:
import someMethod from "@salesforce/apex/Namspace.Class.someMethod";
However, this leads to LWC1526: Invalid module id when deploying to a scratch org. It should actually be without the Namespace prefix:
LWC1526: Invalid module id
Namespace
import someMethod from "@salesforce/apex/Class.someMethod";
I assume that the namespace is relevant when not developing your own package but for non-managed packages, this results in an error.
import methodName from "@salesforce
LWC1526
Autocompletion result is:
VS Code Version: 1.49.3
1.49.3
salesforce.salesforcedx-vscode-lwc: v49.13.0
v49.13.0
SFDX CLI Version: sfdx-cli/7.75.0-5521f40d11 darwin-x64 node-v12.18.3
sfdx-cli/7.75.0-5521f40d11 darwin-x64 node-v12.18.3
OS and version: macOS 10.14.6
macOS 10.14.6
Logged as a work item to investigate - W-8340576
Thanks for reporting this @KevSlashNull! This should have been addressed by #3568, feel free to reopen if you see other issues
Summary
In a Lightning Web Component, trying to auto-complete an Apex method inside a project with namespace, leads to the following auto-completion:
However, this leads to
LWC1526: Invalid module id
when deploying to a scratch org. It should actually be without theNamespace
prefix:I assume that the namespace is relevant when not developing your own package but for non-managed packages, this results in an error.
Steps To Reproduce:
import methodName from "@salesforce
LWC1526
Expected result
Autocompletion result is:
Actual result
Autocompletion result is:
Additional information
VS Code Version:
1.49.3
salesforce.salesforcedx-vscode-lwc:
v49.13.0
SFDX CLI Version:
sfdx-cli/7.75.0-5521f40d11 darwin-x64 node-v12.18.3
OS and version:
macOS 10.14.6