Local dev failing with "unusual" components (e.g: css only component, multiple js files in the same component)

Open
#310 2 comments 1 reaction 1 assignee View on GitHub

@nrkruk is already working on this.

Since Jan 10, 2025.

Assessment

This issue has not been assessed yet.

Description

BUG P2
Summary

While trying to launch an Experience Site, I having multiple errors that prevent usage. Two examples so far are:

  1. Components that are css only: the server launch fails with ServerError: An unexpected error occurred: "ENOENT: no such file or directory, open 'C:\Workspace\pbs\force-app\main\default\lwc\mycomponent\mycomponent.js' (Note: I can bypass this by adding an empty js file)
  2. Components that have multiple js files and import elements from them (import { Builder } from './builder';): server launch fails with LWR Diagnostic Error: An unexpected error occurred: "ENOENT: no such file or directory, open 'C:\Workspace\pbs\force-app\main\default\lwc\mycomponent\builder'
Additional Information

Screenshots:

image

Logs:

System Information

SF CLI: @salesforce/cli/2.70.7 win32-x64 node-v20.11.0
Plugin version: prerelease
Terminal: git bash

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.70.7",
  "nodeVersion": "node-v20.11.0",
  "osVersion": "Windows_NT 10.0.26100",
  "rootPath": "C:\\Users\\Fernando Gavinho\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.13 (core)",
    "@oclif/plugin-commands 4.1.13 (core)",
    "@oclif/plugin-help 6.2.19 (core)",
    "@oclif/plugin-not-found 3.2.30 (core)",
    "@oclif/plugin-plugins 5.4.22 (core)",
    "@oclif/plugin-search 1.2.17 (core)",
    "@oclif/plugin-update 4.6.17 (core)",
    "@oclif/plugin-version 2.2.17 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.26 (core)",
    "@oclif/plugin-which 3.2.20 (core)",
    "@salesforce/cli 2.70.7 (core)",
    "apex 3.6.7 (core)",
    "api 1.3.2 (core)",
    "auth 3.6.80 (core)",
    "data 3.13.1 (core)",
    "deploy-retrieve 3.15.20 (core)",
    "info 3.4.27 (core)",
    "lightning-dev 2.8.0 (user) published 19 days ago (Thu Dec 19 2024) (latest is 1.10.0)",
    "limits 3.3.42 (core)",
    "marketplace 1.3.7 (core)",
    "org 5.2.9 (core)",
    "packaging 2.9.6 (core)",
    "schema 3.3.44 (core)",
    "settings 2.4.9 (core)",
    "sobject 1.4.46 (core)",
    "telemetry 3.6.27 (core)",
    "templates 56.3.33 (core)",
    "trust 3.7.50 (core)",
    "user 3.6.4 (core)"
  ]
}

OS: Windows

Experience Sites Only:

{
  "orgId": "00DPv000001Iw8D",
  "siteId": "0DMPv0000001Lf8",
  "clwrVersion": "254.159",
  "coreVersion": "254.2",
  "coreChangelist": "50901517",
  "bundleGenerationDate": "Jan 8, 2025 1:11:27 PM",
  "siteTemplateName": "talon-template-byo",
  "deployTarget": "CORE"
}
Dominant language
TypeScript
Stars
19
Forks
19
Avg merge
3d 12h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from salesforcecli/plugin-lightning-dev

All issues in salesforcecli/plugin-lightning-dev

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.