Just a quick thank you for this series! I am learning a lot. I am going through all of the videos, but I may have to skip some of the Stockfish ones as my terminal did not recognize npm so I won't download it (I may try later, but am worried that by not using your technique I won't find the .js file you alluded to. Anyway, this is a great series, and you are very kind to share this with the public. You deserve many more likes / views than you have received for this.
Thanks for the kind words! I'm really glad you're finding the series helpful. For the npm issue, you just need to install Node.js from nodejs.org. It includes npm by default. After installing, open your terminal and type npm -v to check if it's set up. That should solve the problem.
Once you’ve installed Stockfish, a “node_modules” folder will be generated in your project folder. Within this folder, you’ll find another folder named “stockfish/source” containing four JavaScript files. You need to reference one of these files in your getEvaluation function like this: var engine = new Worker("./node_modules/stockfish/src/stockfish-nnue-16.js");
Open your project in VSCode. Open the terminal in VSCode. You can do this by going to the top menu and selecting Terminal -> New Terminal. In the terminal, type the command npm install stockfish and press enter. The terminal will start downloading Stockfish. This process may take a few minutes. Once the download is complete, you will find a new folder named node_modules in your project folder. Inside the node_modules folder, you will find another folder named stockfish. This is where the downloaded Stockfish files are located.
Just a quick thank you for this series! I am learning a lot. I am going through all of the videos, but I may have to skip some of the Stockfish ones as my terminal did not recognize npm so I won't download it (I may try later, but am worried that by not using your technique I won't find the .js file you alluded to. Anyway, this is a great series, and you are very kind to share this with the public. You deserve many more likes / views than you have received for this.
Thanks for the kind words! I'm really glad you're finding the series helpful. For the npm issue, you just need to install Node.js from nodejs.org. It includes npm by default. After installing, open your terminal and type npm -v to check if it's set up. That should solve the problem.
I am getting this error: Uncaught ReferenceError: SharedArrayBuffer is not defined in stockfish-nnue-16-no-Worker.js
Try using the Live Preview extension for your local server setup.
instead of using stockfish-nnue-16.js as engine worker, try using stockfish-nnue-16-single.js
how did you get the npm install running after you did npm install stockfish
Once you’ve installed Stockfish, a “node_modules” folder will be generated in your project folder. Within this folder, you’ll find another folder named “stockfish/source” containing four JavaScript files. You need to reference one of these files in your getEvaluation function like this:
var engine = new Worker("./node_modules/stockfish/src/stockfish-nnue-16.js");
How to download stockfich? I need a detailed guide. Please please
Open your project in VSCode.
Open the terminal in VSCode. You can do this by going to the top menu and selecting Terminal -> New Terminal.
In the terminal, type the command npm install stockfish and press enter.
The terminal will start downloading Stockfish. This process may take a few minutes.
Once the download is complete, you will find a new folder named node_modules in your project folder.
Inside the node_modules folder, you will find another folder named stockfish. This is where the downloaded Stockfish files are located.