arima icon indicating copy to clipboard operation
arima copied to clipboard

Module not found: Can't resolve 'fs' in node_modules\arima\wasm

Open SteffiKeranJ opened this issue 4 years ago • 6 comments

Bug Report

On running node.js server in my Angular 8 application using yarn start locally am encountering :

ERROR in ./node_modules/arima/wasm/native.js Module not found: Error: Can't resolve 'fs'in '..\node_modules\arima\wasm''

SteffiKeranJ avatar Oct 17 '20 15:10 SteffiKeranJ

Thanks for reporting that. How can I reproduce the error? Have you installed arima from npm or github?

zemlyansky avatar Nov 15 '20 17:11 zemlyansky

Hi @zemlyansky, I had used npm for installing arima package. It was npm install arima

SteffiKeranJ avatar Nov 15 '20 17:11 SteffiKeranJ

same issue

ghost avatar Mar 05 '21 11:03 ghost

@mprendki, @SteffiKeranJ I can't reproduce the issue, not locally not with RunKit: https://npm.runkit.com/arima Are you using some bundler to load arima in the browser?

zemlyansky avatar Mar 06 '21 06:03 zemlyansky

Same issue with webpack 5

kovart avatar May 01 '22 17:05 kovart

Fixed by adding the following lines to webpack.config.js:

resolve: {
    extensions: ['.js', '.json', '.wasm'],
    fallback: {
      fs: false,
      path: require.resolve('path-browserify'),
    },
}

You also need to install path-browserify module with npm i -D path-browserify

kovart avatar May 01 '22 17:05 kovart