SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
Hello, I am running scichart in a blazorwasm app. On updating from 1.x to 2.2.2351 I am getting an uncaught error for a missing module on app startup before I make any calls to scichart to initialize.
The error is:
Uncaught Error: Cannot find module ‘../Charting/Model/Filters/HlcScaleOffsetFilter’
at webpackMissingModule (buildDataSeries.js:15:94)
at eval (buildDataSeries.js:15:215)
at Object../node_modules/scichart/Builder/buildDataSeries.js (strategyChart.js:133:1)
at webpack_require (strategyChart.js:21:30)
at eval (chartBuilder.js:45:25)
at Object../node_modules/scichart/Builder/chartBuilder.js (strategyChart.js:181:1)
at webpack_require (strategyChart.js:21:30)
at eval (SciChartSurface.js:30:22)
at Object../node_modules/scichart/Charting/Visuals/SciChartSurface.js (strategyChart.js:3253:1)
at webpack_require (strategyChart.js:21:30)
My webpack is:
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
module.exports = {
mode: "development",
entry: {
strategyChart: './src/strategyChart.js'
},
module: {
rules: []
},
resolve: {
extensions: [".js"]
},
output: {
path: path.resolve(__dirname, '../wwwroot'),
filename: "[name].js",
library: "[name]"
},
plugins: [
new CopyPlugin({
patterns: [
{ from: "node_modules/scichart/_wasm/scichart2d.data", to: "" },
{ from: "node_modules/scichart/_wasm/scichart2d.wasm", to: "" }
]
}),
new webpack.IgnorePlugin(/(fs)/)
]
};
I think I figured it out. This line can you remove it?
new webpack.IgnorePlugin(/(fs)/)
From the breaking changes list: https://www.scichart.com/documentation/js/current/webframe.html#Breaking%20Changes%20in%20SciChart.js%20v2.x.html
Ignore fs should be removed or updated in webpack.config
In v1 it was recommended that webpack.config includenew webpack.IgnorePlugin(/(fs)/)
This is no longer required due to upgrades to our build, and may cause problems (especially with the filters api) as it ignores any file containing the string fs. If you do still need to ignore the fs package specifically (as some packages depend on it for node.js support but this breaks when in a browser), then use this line:
new webpack.IgnorePlugin(/^fs$/);
Hi Leland
Try deleting node_modules then npm install again
Now navigate into node_modules/scichart
Are the files you’re requiring there at the specified folder? Eg is HlcScaleOffsetFilter found in SciChart/Charting/Model/Filters/HlcScaleOffsetFilter?
Please login first to submit.