react-stockcharts icon indicating copy to clipboard operation
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

Open AmalRichwin-AT opened this issue 4 years ago • 5 comments

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

AmalRichwin-AT avatar Oct 28 '21 05:10 AmalRichwin-AT

I am having this same issue, except I can load the page once fine but then on reload the error will throw.

clide7029 avatar Mar 23 '22 01:03 clide7029

Same issue for me after reload

rnnyrk avatar Apr 26 '22 11:04 rnnyrk

Same here

c9s avatar May 13 '22 11:05 c9s

Solution for create-react-app provided environment worked for me

  1. Install craco package (https://github.com/gsoft-inc/craco) if it didn't installed before
  2. Insert following config into craco.config.js file (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).

qunaxis avatar May 14 '22 17:05 qunaxis

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

andyevers avatar May 21 '22 14:05 andyevers