Skip to content

Failed to parse source map #396

Closed
Closed
@braddi

Description

@braddi

I have upgraded to CRA 5 and I'm getting this compilation error:

WARNING in ./node_modules/autolinker/dist/es2015/truncate/truncate-end.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '\node_modules\autolinker\src\truncate\truncate-end.ts' file: Error: ENOENT: no such file or directory, open '\node_modules\autolinker\src\truncate\truncate-end.ts'

image

      "dependencies": {
        "autolinker": {
          "version": "3.16.2",
          "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.16.2.tgz",
          "integrity": "sha512-JiYl7j2Z19F9NdTmirENSUUIIL/9MytEWtmzhfmsKPCp9E+G35Y0UNCMoM9tFigxT59qSc8Ml2dlZXOCVTYwuA==",
          "requires": {
            "tslib": "^2.3.0"
          }
        },

Somehow CRA keeps trying to find the map files in src folder instead of dist.

Activity

yingxinj

yingxinj commented on Dec 23, 2022

@yingxinj

+1, I have the same error. I believe that we could either set sourcemap: false in rollup.config.ts or include files: src in package.json, but I'm not sure which one would be preferable?

k-funk

k-funk commented on Jul 13, 2023

@k-funk

Also running into this issue via installing https://www.npmjs.com/package/swagger-ui-react, which depends on https://www.npmjs.com/package/remarkable, which depends on Autolinker 3.x.

gregjacobs

gregjacobs commented on Dec 25, 2024

@gregjacobs
Owner

Apologies on the delay on this. Source maps should be fixed with Autolinker 4.0.2+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gregjacobs@k-funk@yingxinj@braddi

        Issue actions

          Failed to parse source map · Issue #396 · gregjacobs/Autolinker.js