Cli: No base file for markup://c:myComponent

Created on 11 Jul 2019  路  3Comments  路  Source: forcedotcom/cli

Summary

If a Lightning web component has the same name as the sfdx project folder, we're getting the following cryptic error: No base file for No base file for markup://c:myComponent.

Steps To Reproduce:

  1. sfdx force:project:create -n myComponent
  2. cd myComponent
  3. sfdx force:lightning:component:create -n myComponent --type=lwc -d force-app/main/default/lwc
  4. sfdx force:org:create -f config\project-scratch-def.json --setalias myScratchOrg --setdefaultusername
  5. sfdx force:source:push

Expected result

Component is deployed to the Scratch Org.

Actual result

Deployment fails with the following error: No base file for No base file for markup://c:myComponent.

Additional information

This may seem like something that never happen, but if I'm working on a single component I want to share, I'm likely to select the same name. Moreover, this error is very cryptic, so I lost 2h to understand what the issue was.

SFDX CLI Version: sfdx-cli/7.14.0-bd96f098e0 win32-x64 node-v10.15.3

SFDX plugin Version:
@oclif/plugin-commands 1.2.2 (core)
@oclif/plugin-help 2.2.0 (core)
@oclif/plugin-not-found 1.2.2 (core)
@oclif/plugin-plugins 1.7.8 (core)
@oclif/plugin-update 1.3.9 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.5 (core)
analytics 1.1.2 (core)
generator 1.1.0 (core)
salesforcedx 46.4.0 (core)
鈹溾攢 force-language-services 46.9.0 (core)
鈹斺攢 salesforce-alm 46.8.0 (core)

sfdx-cli 7.14.0 (core)
shane-sfdx-plugins 3.21.0 (link) C:\Users\ftaillon\workspace\code\shane-sfdx-plugins
texei-sfdx-plugin 0.0.5 (link) C:\Users\ftaillon\workspace\code\texei-sfdx-plugin

OS and version: Windows 10

bug

Most helpful comment

@FabienTaillon, this is a bug on our side and I am adding it to our backlog

All 3 comments

Thank you @FabienTaillon, We will take a look

@FabienTaillon, this is a bug on our side and I am adding it to our backlog

I noticed there is a "FIX: You can use the same name for a Salesforce DX project and Lightning web component." in the release notes of the v46.10.1.

I tried and it's working now, closing the issue.

Was this page helpful?
0 / 5 - 0 ratings