'Run https://github.com/akella/webgl-mouseover-effects code locally

I want to implement image hover effect like on this website https://miew.pt/, and the closest example I got or came across can be found here https://github.com/akella/webgl-mouseover-effects

  1. I have downloaded and extracted the files but when I run/open e.g step3.html, I am getting errors.

  2. I have run yarn add but still getting same error as in point 1.

The error in point 1 & 2 is "Uncaught SyntaxError: Cannot use import statement outside a module"

What's the correct way to set up the code locally(Win 10)?



Solution 1:[1]

I just used:

npm install
npm run parcel -- step3.html

and it worked on my setup (Win 10 + NPM 6.14.14 + Node v14.17.5)

Can you try again with this setup ?

enter image description here

Solution 2:[2]

This is a duplicate of https://stackoverflow.com/a/67575139/8887313

GitHub pages will host your client side files and run some static site generators (Jekyll, etc.) but will not host a server for you. There are various platforms that you can deploy your server side code, for example on AWS/Azure/GCP or Heroku.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nick Papadiochos
Solution 2 ATOMP