← All tasks
javascriptmarkedjs/marked #2885Not a task: not reproduced

Angular + Yarn pnp support

envgap__markedjs__marked-2885

01 / FAILURE SIGNATURE

As reported upstream

Error: Package path ./marked.min.js is not exported from package .yarn\cache\marked-npm-4.3.0-da40d83667-0db6817893.zip\node_modules\marked\ (see exports field in .yarn\cache\marked-npm-4.3.0-da40d83667-0db6817893.zip\node_modules\marked\package.json)
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
3aa17427097ee5bfe4fc2062dc185db6b808a157
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

markedjs/marked #2885 · read the original issue
Marked version: 4.3.0 (via `ngx-markdown`)



**Describe the bug**

Currently, the `marked.min.js` file isn't being exported from the package, which makes it hard to use in Angular applications with Yarn PnP.  Angular will load scripts declared in their `angular.json` if that script is exported.  Currently the exports are only the following:

```json

"exports": {

    ".": {

      "import": "./lib/marked.esm.js",

      "default": "./lib/marked.cjs"

    },

    "./bin/marked": "./bin/marked.js",

    "./package.json": "./package.json"

  }

```



So I end up with an error when I declare `marked/marked.min.js`

```json

"scripts": [

  "marked/marked.min.js",

  "prismjs/prism.js",

  "prismjs/components/prism-json.min.js",

  "prismjs/components/prism-scss.min.js",

  "prismjs/components/prism-typescript.min.js"

],

```



The prism scripts load ok, but for the marked script I get this error:

```bash

Error: Package path ./marked.min.js is not exported from package .yarn\cache\marked-npm-4.3.0-da40d83667-0db6817893.zip\node_modules\marked\ (see exports field in .yarn\cache\marked-npm-4.3.0-da40d83667-0db6817893.zip\node_modules\marked\package.json)



```



**Proposal**

I'm proposing simply adding the `marked.min.js` to the package export list:



```json

"exports": {

    ".": {

      "import": "./lib/marked.esm.js",

      "default": "./lib/marked.cjs"

    },

    "./marked.min.js": "./marked.min.js",

    "./bin/marked": "./bin/marked.js",

    "./package.json": "./package.json"

  }

```

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]