question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to parse source map from '../@antv/layout/src/util/object.ts' file

See original GitHub issue

🐛 bug 描述

一直报下面的 Warning

WARNING in ./node_modules/@antv/layout/es/util/object.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from…/@antv/layout/src/util/object.ts’ file: Error: ENOENT: no such file or directory, open ‘’ /node_modules/@antv/layout/src/util/object.ts'

© 版本信息

  • ant-design-charts 版本: 1.2.4
  • 浏览器环境: Chrome
  • 开发环境: Mac OS

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lxfu1commented, Feb 22, 2022

🐛 bug 描述

一直报下面的 Warning WARNING in ./node_modules/@antv/layout/es/util/object.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from…/@antv/layout/src/util/object.ts’ file: Error: ENOENT: no such file or directory, open ‘’ /node_modules/@antv/layout/src/util/object.ts'

© 版本信息

  • ant-design-charts 版本: 1.2.4
  • 浏览器环境: Chrome
  • 开发环境: Mac OS

这个如何复现呢?在什么场合下会报着个warning?

感谢你的回复,如果正常没有问题的话,那就行了~ 我也很难描述,工程是 react+ typescript, 就 webpack 编译期间会报 warning.

只引用了其中的一个 chart

import { Line } from '@ant-design/charts';

如果只使用了统计图表,建议直接使用 plots (charts 的子包)

  import { Line } from '@ant-design/plots';
0reactions
xams-creatorcommented, Nov 1, 2022

如果用的是 react-scripts 5.x ,可以把 GENERATE_SOURCEMAP=false 添加到 .env文件中

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to parse source map - Stack Overflow
You can remove the warning by adding GENERATE_SOURCEMAP=false to your .env file. Actually, CRA with Webpack 5.x cause it.
Read more >
After Upgrading to CRA 5.0 getting a lot of: Failed to parse ...
Upgraded and now I'm getting a lot of Failed to parse source map from warnings. ... But for some reason CRA wants the...
Read more >
Failed to parse source map warnings - Dynamic Docs
If using create-react-app v5, you may see some warnings (although they appear like errors) when running/building your react application.
Read more >
source-map-loader - webpack
Extracts source maps from existing source files (from their ... import css from "file.css"; ... ignoreWarnings: [/Failed to parse source map/], };.
Read more >
"Failed to parse source map" errors with datetime picker and ...
Hello, When using the Atlaskit DateTimePicker components in my Create React App 5.0.0 app, I get warnings about missing sourcemaps in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found