react-stockcharts
react-stockcharts copied to clipboard
Error: Cannot find module 'D:\charts\node_modules\@react-financial-charts\annotations\lib\Annotate' imported from D:\charts\node_modules\@react-financial-charts\annotations\lib\index.js
When i have installed the package and tried to run, it throwed this @error.
Error: Cannot find module 'D:\charts\node_modules@react-financial-charts\annotations\lib\Annotate' imported from D:\charts\node_modules@react-financial-charts\annotations\lib\index.js
I am having this same issue, except I can load the page once fine but then on reload the error will throw.
Same issue for me after reload
Same here
Solution for create-react-app provided environment worked for me
- Install craco package (https://github.com/gsoft-inc/craco) if it didn't installed before
- Insert following config into
craco.config.jsfile (or extend it):
module.exports = {
webpack: {
configure: {
module: {
rules: [
{
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
},
]
}
}
}
}
P.S. It's just a little overriding of default webpack 5 configuration provided by [email protected] (my currently installed version).
I had this same issue on my Next.js app while using react-financial charts and was able to solve it with the solution by adamhwang here: https://github.com/react-financial/react-financial-charts/issues/606
You'll need this package: https://github.com/martpie/next-transpile-modules