npm install brain.js
如果您遇到错误,请尝试使用以下命令:
npm install brain.js --unsafe-perm=true --allow-root
"dependencies": {
"brain.js": "^1.0.0"
}
然后在命令行中运行以下命令:
npm install
git clone https://github.com/BrainJS/brain.js.git
接下来,在命令行中进入文件夹,然后安装依赖:
cd brain.js
npm install
最后,您可以将brain.js作为npm包引入项目中使用。