2

I am trying to create a neural network using javascript. So, I found brain JS, and I'm following this tutorial.

https://github.com/BrainJS/brain.js#brainjs

First of all, the installation : npm install brain.js Then I change it to npm install brain So the errors are fixed.

Now I'm using visual studio and I tryed to run this first line but :

const brain = require('brain.js'); 

I got

Uncaught ReferenceError ReferenceError: brain is not defined
desertnaut
  • 57,590
  • 26
  • 140
  • 166
kloud
  • 221
  • 1
  • 10

1 Answers1

2

Try the same command without the dot:

npm install brainjs

as described in Strange npm error when running npm install brain.js

desertnaut
  • 57,590
  • 26
  • 140
  • 166
user9467051
  • 118
  • 2
  • 11
  • It helps me I don't have errors in the npm brainJS installation – kloud Jul 13 '22 at 10:17
  • but I still have the problem when execution the code ```Uncaught ReferenceError ReferenceError: brain is not defined ``` – kloud Jul 13 '22 at 10:18