I am trying to use the Rellax parallax library in a project, but I’m running into an error when trying to run the code required:
var rellax = new Rellax(’.rellax’);
I receive the following error:
ERROR in ./resources/assets/scripts/main.js Module build failed: Module failed because of a eslint error. /home/nadal/Web/x/site/web/app/themes/x/resources/assets/scripts/main.js 29:1 error 'rellax' is not defined no-undef 29:14 error 'Rellax' is not defined no-undef ✖ 2 problems (2 errors, 0 warnings) @ multi ./resources/assets/build/util/../helpers/hmr-client.js ./scripts/main.js ./styles/main.scss
The JS file is properly imported as I’ve seen the code in the compiled main.js.
Any ideas on how to solve this?