Can't run the server.js in "Gold Medal Metrics"-Project

Hi there,
i was trying to run the server.js with node server.js. But it just throw an error “Error: Cannot find module ‘sqlite3’”.
I thought no big deal, i just must install the sqlite3 with npm install sqlite3.
But this throws an error too:

npm ERR! sqlite3@4.2.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

It would be great if anyone could help my, by solving this problem.
If you need the full error log just tell me.

Here the link to the project:

1 Like

Hey, i could solved the problem and i want to share with you how i solved it.

I checked the log again and again. I saw that some errors refer to “python”. I was confused because i installed it, but i forgot to “add python to PATH” (This is how this option is called in the python installer).
After this the “npm install sqlite” runs futher but still throws an error. The next error was telling that there is a problem with “VS”. I googled a bit and found this article: GitHub - nodejs/node-gyp: Node.js native addon build tool
Then i did the step called “Option 1” and ran this command npm install --global windows-build-tools
The command installed python (again) and VS. After running this i could start the server.

I hope somebody who has the same problem can solve it with this explanation.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.