---
schema_version: "1"
id: b0f30970e3861aa4213156a6bae36797195ca53fb54b64c8466363f5c02753de
title: Components Fail to Load with a Commented-Out Import
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lwc/lightning-components-security/guides/lws/lwc-comp-fail-fix.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-components-security/guide/lwc-comp-fail-fix.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c93303f1a81aa0214d887fc402f37e5123f3feb8d977155c2a45265da3a5e48d
products:
  - Security for Lightning Components
  - lwc
---
# Components Fail to Load with a Commented-Out Import

Lightning Web Components (LWC) fail to load when Lightning Web Security (LWS) is disabled, Lightning Debug Mode is enabled, and the component contains a commented-out `import(...)` statement (such as in a JSDoc `@typedef`). The error occurs because the legacy Lightning Locker evaluator incorrectly parses the commented text as an active dynamic import.

## Workaround

Apply any one of these solutions:

- Remove the commented-out `import(...)` or JSDoc statement from your code.
- Enable Lightning Web Security (recommended).
- Disable Lightning Debug Mode.
