Skip to content

F5 fails with ENOENT when running JavaScript + AZD templates with package.json under src #5128

Description

@v-ruizh

OS: Win 11 x64
Build Version: 20260708.1

Repro Steps:

  1. Create a JavaScript Functions project from Template Gallery (for example. Timer Trigger (JavaScript + AZD + Bicep)).
  2. Observe that package.json is created under the src folder rather than the workspace root.
  3. Press F5.

Expect:
The Azure Functions extension should detect the project directory containing package.json and execute npm commands from that location.

Actual:
F5 fails with ENOENT because the extension executes npm install from the workspace root, where no package.json exists.
Image

More Info:
This issue does not reproduce with HTTP Trigger (JavaScript + AZD + Bicep), where package.json is generated in the workspace root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AT-CTICreated by CTI team

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions