If you get an error like “Install Error: Can’t find Python executable”, you may need to install windows build tools, the command to run is

npm –add-python-to-path=’true’ –debug install –global windows-build-tools

You may then hit some issues with TSLint and TSConfig, which throw the error

node_modules/brain.js/src/index.d.ts:147:14 – error TS2300: Duplicate identifier ‘NeuralNetworkGPU’.

147 export class NeuralNetworkGPU extends NeuralNetwork {}

node_modules/brain.js/src/index.d.ts:258:14 – error TS2300: Duplicate identifier ‘NeuralNetworkGPU’.

258 export class NeuralNetworkGPU extends NeuralNetwork {

At the time of writing this, there is various issues with stopping tsconfig from going over the node_modules, using the excludes and includes doesnt work, however you can add “skipLibCheck”:¬†true to your comiler options to get around the issue.