When using this package in an Astro project, Astro throws this error
error Failed to resolve entry for package "@kontent-ai/delivery-node-parser". The package may have incorrect main/module/exports specified in its package.json.
as there is no esm5 or esm folder in the package /dist folder, only 'cjs, es6, es2020, esnext'.
Repro steps
There's quite a few steps to reproduce in our demo repo but I believe if you try and add this package to any Vite project, it should throw the same error (as Astro uses Vite under the hood).
If you need more details @Enngage I'm more than happy to record a quick demo video or jump on a Zoom call / Hangout.
Expected behavior
The module references in package.json point to the correct output folder.
Additional context
In our demo Astro project we resolve rich text info from the Delivery API into an object, so that we can create a custom resolver component for outputting the HTML we need.
Brief bug description
When using this package in an Astro project, Astro throws this error
error Failed to resolve entry for package "@kontent-ai/delivery-node-parser". The package may have incorrect main/module/exports specified in its package.json.
It looks like
in the
package.json
should readas there is no esm5 or esm folder in the package
/dist
folder, only 'cjs, es6, es2020, esnext'.Repro steps
There's quite a few steps to reproduce in our demo repo but I believe if you try and add this package to any Vite project, it should throw the same error (as Astro uses Vite under the hood).
If you need more details @Enngage I'm more than happy to record a quick demo video or jump on a Zoom call / Hangout.
Expected behavior
The module references in
package.json
point to the correct output folder.Additional context
In our demo Astro project we resolve rich text info from the Delivery API into an object, so that we can create a custom resolver component for outputting the HTML we need.
but while our editor doesn't throw an error (it resolves the
dist/cjs
files), the Vite dev server Astro runs under the hood throws an errorGoing into
node_modules/@kontent-ai/delivery-node-parser/package.json
and changingmodule
andes2015
to the following resolves the issues