Pre loader

Missing module error

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
0
0

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)/)
    ]
};
Version
2.2.2351
  • You must to post comments
Best Answer
0
0

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 include

new 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$/);

  • Leland
    Thank you this does seem to have resolved my issue. Apologies for not catching this in that article. I was also apparently not using the most recent github examples. Thank you for your timely response.
  • Andrew Burnett-Thompson
    Awesome. Glad it worked! This forum Q will serve as a helpful note for anyone else who has the same issue.
  • You must to post comments
0
0

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?

  • Leland
    Hello Andrew, I did as you suggested. After deleting the folder and running npm install the file in the error message is there. But after building the project and re-running the application, I get the same error on startup.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.