forcedotcom / lwc-dev-server-feedback

LWC Local Development
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

LWC unable to import another LWC, possible namespace issue. #20

Closed ghost closed 4 years ago

ghost commented 4 years ago

Describe the bug Loading a LWC that references another LWC in its markup results in an error:

[0] [rollup] 'c/sampleLWC' is imported by force-app/main/default/lwc/anotherLWC/anotherLWC.js, but could not be resolved – treating it as an external dependency

Both LWCs are in the same project/force-app/main/default/lwc directory. Our package will be a managed package with a namespace, but is currently unreleased. I've tried adding the namespace to the localdevserver.config.json, but it does not change the results. { "namespace": "ourSampleNamespace" }

To Reproduce Steps to reproduce the behavior:

  1. Start lwc-dev-server.
  2. Click on a LWC that references another LWC in its markup.
  3. Observe error, for example: image
  4. Observe error in lwc-dev-server terminal window, for example:

    [0] [rollup] 'c/packetBuilderPacketSelectorModal' is imported by force-app/main/default/lwc/packetBuilder/packetBuilder.html, but could not be resolved – treating it as an external dependency

Expected behavior The selected LWC loads with its dependent LWCs.

Desktop (please complete the following information):

xialisun commented 4 years ago

I am facing the same issue. @scott-call have you find any work around?

stale[bot] commented 4 years ago

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

git2gus[bot] commented 4 years ago

This issue has been linked to a new work item: W-7321597

lcampos commented 4 years ago

This issues are fixed in release 2.4.0, thanks for providing feedback.