Closed CarolineBoyer closed 4 years ago
run npm update
That's what I did, but didn't change a thing... =/ Still have the warning (plus my package ant-design/charts was already at last version (according to package.json : "version": "0.9.4", )
> npm view @ant-design/charts version
0.9.4
So I feel update isn't the right choice here =(
Warning or error ? I tried it with you configuration and didn't report any error.
Warnings in both console (cmd and chrome one) I even tried
rm -rf node_modules
rm package-lock.json
npm install
npm update
Nothing was listed in
npm outdated
Re-running the
and chrome console (extract as well)
Any change to know why this is happening or clues I could give you to help ? =(
I can't trigger this warning on Mac OS, maybe Windows wents to. do you have any other charts dependencies?
same
@lxfu1 This also happens when creating a Column chart using antv/g2plot. (or if I transform it to an antd/charts) which is why I thought this was a dependency issue ?
import React from 'react';
import {Column} from '@antv/g2plot';
import {useSelector} from "react-redux";
import {StateFromAllReducers} from "../../../redux/store";
import Stat from "../../../utils/models/Stat";
import {IntlMessage} from "../../Utils/IntlMessage";
export const NbOfMessagesPerService = () => {
let $refdom: HTMLElement | null;
const dataStats: Stat[] = useSelector((state: StateFromAllReducers) => state.statsManagement.data);
let data: { service: string, value: number }[] = [];
if (dataStats.length === 0) {
data = [{service: '', value: 0}] //handling show when empty
} else {
dataStats.map((oneStatData: Stat) => {
const oneStat = new Stat(oneStatData);
let services = oneStat.getAllCalledServices();
if (services.length === 0) {
data = [{service: '', value: 0}]
} //handling show when empty
services.map((oneServiceName: string) => {
const index: number = data.findIndex((oneStatInData) => oneStatInData.service === oneServiceName);
if (index !== -1 && oneStat.total) {
data[index].value = data[index].value + oneStat.total.message_per_called_services[oneServiceName];
} else {
data = [...data, {
service: oneServiceName,
value: oneStat.total.message_per_called_services[oneServiceName]
}]
}
});
});
}
React.useEffect(() => {
const chart = new Column($refdom!, {
data,
xField: 'service',
xAxis: {
visible: true,
line: {
visible: true
},
title: {
visible: false
}
},
yField: 'value',
yAxis: {
visible: true,
line: {
visible: true
},
title: {
visible: false
}
},
});
chart.render();
return function cleanup() {
$refdom = null;
}
}, []);
return (
<div>
<div className="ant-statistic-title">
<IntlMessage id={"MONITORING_STATISTICS_MESSAGES_PER_SERVICE_TITLE"}/>
</div>
<div
ref={(e) => ($refdom = e)}
/>
</div>
)
};
If I comment the two charts, those warnings disappear.
I faced the same issue. I made the warnings go away by excluding /node_modules/@antv/
from the source-map-loader rule in my webpack config. Hope it helps.
{
enforce: 'pre',
test: /\.jsx?$/,
loader: 'source-map-loader',
exclude: [
/node_modules\/@antv/
]
}
Hi guys,
what I could detect is:
at isSupported (node_modules/@antv/g2plot/src/plots/word-cloud/wordcloud2.ts:119:12)
at Object.
THERE'S NO FOLDER: node_modules/@antv/g2plot/src, ANYWHERE ON MY LAPTOP
Also, when you hover the cursor to jump to the folder in the console, the line with /area/index.js is OK, but the one with /src/index.js not anymore, meaning there's no folder for that.
Upgrade 1.0.
I have the same thing here, over 700 warnings, even I ctrl+click to the directories, it opens them
I have the same problem. My installed version is 2.1.2
(English hope I am putting the right info at the right place)
🐛 bug 描述 [详细地描述 bug,让大家都能理解]
After installing npm i @ant-design/charts, and creating a Line Chart like this :
When running code, al lot of those kind of errors appears.
and many more appears in console. Webpack has noted more than 399 warnings.
📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]
🏞 期望结果 [描述你原本期望看到的结果]
No warnings
💻 复现代码 [提供可复现的代码,仓库,或线上示例]
Hard to give as I just created a simple file using a freshly installed lib
© 版本信息
🚑 其他信息 [如截图等其他信息可以贴在这里]
I have posted this error on G2Plot https://github.com/antvis/G2Plot/issues/1129 It might help you with this, though I didn't understand their answer !