anandanand84 / technicalindicators

A javascript technical indicators written in typescript with pattern recognition right in the browser
MIT License
2.15k stars 557 forks source link

Failed to compile webpack with uglify #128

Closed ghost closed 5 years ago

ghost commented 6 years ago

I'm using the default create-react-app configuration. When I try to npm run build, I run into this error:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

    ./node_modules/keras-js/lib/Tensor.js:22 

Read more here: http://bit.ly/2tRViJ9

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app@0.1.0 build: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the app@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

If I disable uglifyjs, then I no longer face this issue. If a fix cannot be found, do you know of any way to get this library precompiled with it's dependencies instead? Or is there anything u recommend doing instead?

Cheers.

anandanand84 commented 6 years ago

I will remove the keras-js dependency in few weeks. Until then you can load it from cdn and ignore the keras-js if you dont need the pattern detection

ghost commented 6 years ago

If I load it from cdn, will I still be able to do pattern detection?

anandanand84 commented 6 years ago

no, pattern detection is not possible unless you have keras-js dependency, which will be fixed soon when I migrate pattern detection to tensorflowjs

ghost commented 6 years ago

Sure, no worries. I'll wait for the depency to change. Can u ping and close this issue when it happens? Thx for the help.

anandanand84 commented 5 years ago

Kerasjs dependency is removed. Load tensorflowjs before the library if pattern detection is required in v2