Skip to content

"@azure/functions-core" can't be resolved by bundlers #201

Open
@pcj

Description

@pcj

When using a bundler such as esbuild, bundling @azure/functions causes this error:

 [ERROR] Could not resolve "@azure/functions-core"

    node_modules/@azure/functions/dist/azure-functions.js:1657:25:
      1657  module.exports = require("@azure/functions-core");

NOTE: bundling with ncc has same problem but esbuild emits a better error message

There is no published npm module @azure/functions-core.

I see that there is a path mapping in tsconfig.json, perhaps it's a shim for old or MS internal code?

In any case, this breaks bundlers and is very annoying. Can we please get this removed from the tsconfig and just use the correct internal import reference?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions