jamro / jsbattle

JavaScript Programming Game (inspired by RoboCode)
http://jsbattle.jmrlab.com
MIT License
105 stars 47 forks source link

Error: No ENV "JSBATTLE_GA_CODE" is defined. Replacement for "GA:XX-XXXXXXXXX-X" in static/index.html cannot be done #25

Closed jamro closed 4 years ago

jamro commented 5 years ago

Reported in #24 by Lapin-Blanc

Hi again, well, I just tried to build the project (without any modifications), and already getting some errors. What I've done git clone https://github.com/jamro/jsbattle.git cd jsbattle npm install npm run build at the end of the build process, I get this error jsbattle-webpage: Error: No ENV "JSBATTLE_GA_CODE" is defined. Replacement for "GA:XX-XXXXXXXXX-X" in static/index.html cannot be done I've also tried with the bundled .tar.gz (latest version) npm version is 6.9.0

jamro commented 5 years ago

Setup env variable JSBATTLE_GA_CODE to whatever and it should work:

export JSBATTLE_GA_CODE=XX-XXXXXXXXX-X

JSBATTLE_GA_CODE is used to configure Google Analytics properly. You can set it to any value if you do not need google analytics stats at all.

Actually, the documentation should be updated because it is not mentioned anywhere. In addition, Google Analytics integration should be optional and done in a more convenient way. Keeping it as a separate issue to fix later

Lapin-Blanc commented 5 years ago

Thank you !