Skip to content

[Sample] Copilot Connector App - deploy fails with TS1479 build error #1766

Description

@HuihuiWu-Microsoft

Summary

The sample Copilot Connector App fails to deploy in remote debug. The deploy fails at the npm run build step with a TypeScript error (TS1479).

Repro Steps

  1. Create the "Copilot Connector App" sample.
  2. Provision.
  3. Deploy (remote debug).

Result: Deploy fails at the build step:

> teamsfx-template-api@1.0.0 build
> tsc

error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("./index.js")' call instead.

The failing action is cli/runNpmCommand running npm run build --if-present during the deploy lifecycle stage.

Reference

  • ADO Bug: 37904538 – [VSC][Daily] The sample 'Copilot Connector App' deployed failed in remote debug

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions