Instruction: do without libraries .. using w3schools and mdn only ..
loads an image and count the averages of R, G and B channels
an http server (for serving and processing image thru canvas)
in my case i use .. (maybe different on your http server)
npm install -g http-server
then http-server
then go to 'localhost:8080'
check the console (browser) for the result
just click index.html (if no cors issue )