【问题标题】:How can I fix sfdx error: The "path" argument must be of type string. Received undefined如何修复 sfdx 错误:“路径”参数必须是字符串类型。收到未定义
【发布时间】:2020-08-10 06:06:04
【问题描述】:

**当我尝试将源代码部署到 Org 时出现此错误**

The "path" argument must be of type string. Received undefined

sfdx-project.json

{
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true
    }
  ],
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "48.0"
}

提前致谢

【问题讨论】:

  • 能否添加您要发送的文件和完整的项目树?

标签: salesforce salesforce-lightning lwc sfdc


【解决方案1】:

我在 VS Code / SFDX 中遇到了同样的问题,偶然发现了这个问题。我最终发现了这个问题,所以我想在这里分享我的解决方案。

我在执行其中一个 Trailhead 模块时遇到此错误,该模块让我将 ldsUtils 组件复制到我的 lwc 文件夹中。我错误地是将ldsUtils.js 文件直接复制到lwc,而不是将其嵌套在ldsUtils 文件夹中。这导致了与您提到的相同的错误。一旦我将ldsUtils.js 文件移动到ldsUtils 文件夹(连同ldsUtils.js-meta.xml),问题就解决了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-02-23
    • 2021-09-08
    • 2020-12-30
    • 2021-09-04
    • 2021-12-12
    • 1970-01-01
    • 1970-01-01
    • 2019-05-13
    相关资源
    最近更新 更多