Brain.js: Error when calling trainAsync

Created on 5 Oct 2020  Â·  3Comments  Â·  Source: BrainJS/brain.js

What is wrong?
When I try to call the trainAsync method, I get a strange error in the console [Object object]

How do we replicate the issue?

Sample code where a similar issue occurs: https://codepen.io/ximik753/pen/pobzJgQ

bug review

All 3 comments

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Confirmed. Looks like bug in one of the dependency.

TypeError: _thaw2.default is not a constructor
 in brain.js/dist/neural-network.js — line 599

I can suggest a hot fix. Open file node_modules/brain.js/src/neural-network.js. Then change the first line

const { Thaw } = require('thaw.js');

To this

const { Thaw } = require('thaw.js/dist');
Was this page helpful?
0 / 5 - 0 ratings

Related issues

iSumitBanik picture iSumitBanik  Â·  4Comments

AkashGutha picture AkashGutha  Â·  5Comments

omer54463 picture omer54463  Â·  6Comments

nezzard picture nezzard  Â·  5Comments

SCMorgan picture SCMorgan  Â·  3Comments