Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to parse source map from... #28

Closed
4 tasks done
mtr1990 opened this issue Oct 2, 2023 · 2 comments
Closed
4 tasks done

Failed to parse source map from... #28

mtr1990 opened this issue Oct 2, 2023 · 2 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@mtr1990
Copy link

mtr1990 commented Oct 2, 2023

Initial checklist

Affected packages and versions

"rehype-raw": "^7.0.0"

Link to runnable example

No response

Steps to reproduce

Dependencies

   "react-markdown": "^9.0.0",
    "rehype-highlight": "^7.0.0",
    "rehype-raw": "^7.0.0",
    "remark-gfm": "^4.0.0",

Code

    <ReactMarkdown
        rehypePlugins={[rehypeRaw, rehypeHighlight, [remarkGfm, { singleTilde: false }]]}
        components={components}
        {...other}
      />

The warning logs will be removed when rehypeRaw is removed or downgrade versions:

   "react-markdown": "^8.0.7",
    "rehype-highlight": "^6.0.0",
    "rehype-raw": "^6.1.1",
    "remark-gfm": "^3.0.1",

Environment:
MacOS
Build and bundle tools: Create react app
Node: v18.17.1
npm : 9.6.7

Expected behavior

Warning is not displayed Failed to parse source map from... When using the latest version.

The version shows a warning

   "react-markdown": "^9.0.0",
    "rehype-highlight": "^7.0.0",
    "rehype-raw": "^7.0.0",
    "remark-gfm": "^4.0.0",

The version not shows a warning

   "react-markdown": "^8.0.7",
    "rehype-highlight": "^6.0.0",
    "rehype-raw": "^6.1.1",
    "remark-gfm": "^3.0.1",

Actual behavior

Compiled with warnings.

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/doctype.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/doctype.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/error-codes.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/error-codes.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/foreign-content.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/foreign-content.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/html.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/html.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/token.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/token.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/unicode.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/unicode.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/index.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/formatting-element-list.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/formatting-element-list.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/index.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/open-element-stack.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/open-element-stack.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/serializer/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/serializer/index.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/index.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/preprocessor.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/preprocessor.js.map'

Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tree-adapters/default.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tree-adapters/default.js.map'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

WARNING in ./node_modules/parse5/dist/common/doctype.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/doctype.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/doctype.js.map'

WARNING in ./node_modules/parse5/dist/common/error-codes.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/error-codes.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/error-codes.js.map'

WARNING in ./node_modules/parse5/dist/common/foreign-content.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/foreign-content.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/foreign-content.js.map'

WARNING in ./node_modules/parse5/dist/common/html.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/html.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/html.js.map'

WARNING in ./node_modules/parse5/dist/common/token.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/token.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/token.js.map'

WARNING in ./node_modules/parse5/dist/common/unicode.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/unicode.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/common/unicode.js.map'

WARNING in ./node_modules/parse5/dist/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/index.js.map'

WARNING in ./node_modules/parse5/dist/parser/formatting-element-list.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/formatting-element-list.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/formatting-element-list.js.map'

WARNING in ./node_modules/parse5/dist/parser/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/index.js.map'

WARNING in ./node_modules/parse5/dist/parser/open-element-stack.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/open-element-stack.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/parser/open-element-stack.js.map'

WARNING in ./node_modules/parse5/dist/serializer/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/serializer/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/serializer/index.js.map'

WARNING in ./node_modules/parse5/dist/tokenizer/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/index.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/index.js.map'

WARNING in ./node_modules/parse5/dist/tokenizer/preprocessor.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/preprocessor.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tokenizer/preprocessor.js.map'

WARNING in ./node_modules/parse5/dist/tree-adapters/default.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tree-adapters/default.js.map' file: Error: ENOENT: no such file or directory, open '/Volumes/DATA/cra-ts/node_modules/parse5/dist/tree-adapters/default.js.map'

webpack compiled with 14 warnings
No issues found.

Runtime

No response

Package manager

No response

OS

macOS

Build and bundle tools

Create React App

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Oct 2, 2023
@ChristianMurphy
Copy link
Member

ChristianMurphy commented Oct 2, 2023

Welcome @mtr1990! 👋
Sorry you ran into a spot of trouble.

A few things to note:

  1. This is a warning, not an error. It would be nice to have but is not blocking your ability to use the project
  2. The warning is coming from parse5 which is a different project, with its own issue tracker https://github.com/inikulin/parse5/issues
  3. Create react app is deprecated Replace Create React App recommendation with Vite reactjs/react.dev#5487 (comment), this may be an unresolved bug there, rather than one in parse5, consider moving to a build tool which still has support like https://vitejs.dev/, https://nextjs.org/, or https://remix.run/ (among others)

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
@ChristianMurphy ChristianMurphy added the 👀 no/external This makes more sense somewhere else label Oct 2, 2023
@github-actions

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants