Azure / Azure/azure-functions-nodejs-library

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

Open
#201 12 comments 12 reactions 0 assignees View on GitHub
area:nodejs-functions documentation P2
Dominant language
TypeScript
Stars
70
Forks
35
Avg merge
4d 18h
Merged PRs (30d)
6

Description

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

```js
✘ [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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.