arima
arima copied to clipboard
Module not found: Can't resolve 'fs' in node_modules\arima\wasm
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''
Thanks for reporting that. How can I reproduce the error? Have you installed arima
from npm or github?
Hi @zemlyansky, I had used npm
for installing arima package. It was npm install arima
same issue
@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?
Same issue with webpack 5
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