SF-PD2 User Interface Practice Question
Exhibit
sfdx force:source:push ERROR running force:source:push: LWC1011: Failed to resolve import "c/utils" from "accountDetails.js". Please check that the file exists and is available in the workspace.
Refer to the exhibit. A developer is attempting to push source code to a scratch org and encounters the error shown. The developer confirms that 'utils.js' and 'utils.js-meta.xml' exist in the 'force-app/main/default/lwc/utils/' directory. What is the most likely cause of this error?
⚠ Common exam trap
Candidates often assume the error is related to XML configuration or file permissions, missing the strict LWC requirement that the JavaScript filename must match the folder name.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The main JavaScript file in the 'utils' folder must be named 'utils.js'.
LWC requires a specific file structure and naming convention for components and modules. When importing a local module, the framework looks for a component folder and a corresponding main JavaScript file. If the main file name does not match the folder name, the compiler cannot resolve the import, leading to deployment failures.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The developer forgot to add the '@salesforce/resource' prefix to the import.
Why it's wrong here
The '@salesforce/resource' prefix is used for importing Static Resources, not for importing other Lightning Web Components or local utility modules. For component-to-component imports, the 'c/' namespace is the correct prefix, and the error indicates a resolution failure within that namespace.
- ✗
The 'utils' component is missing the 'isExposed' tag in its metadata file.
Why it's wrong here
The 'isExposed' tag determines if a component is visible in tools like the Lightning App Builder. It does not affect the ability of one component to import another in the source code. Internal imports are governed by file visibility and naming within the project structure, not by exposure metadata.
- ✓
The main JavaScript file in the 'utils' folder must be named 'utils.js'.
Why this is correct
In LWC, the main JavaScript file of a component must have the exact same name as the folder it resides in. If the folder is named 'utils', the framework expects a file named 'utils.js'. If the file is named differently, the 'c/utils' import path will fail to resolve during the compilation process.
- ✗
The developer needs to run 'sfdx force:source:pull' first to sync metadata.
Why it's wrong here
Pulling metadata from the org is used to sync changes made in the UI back to the local workspace. It does not resolve compilation errors caused by incorrect local file naming or invalid import statements. The error is a local build issue that must be fixed in the source code.
Visual reference
About these practice questions
Courseiva writes every SF-PD2 question from scratch — 226 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Salesforce exam blueprint
This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.