
If you get a JS error "ReferenceError: require is not defined"
All you need to do is use " {{require}} " instead of "require" in your code, and the error should be resolved.
In order to do that you need to :
1.From left menu go to Layout & design
[rebelmouse-proxy-image https://media.rbl.ms/image?u=%2Fmedia.forumbee.com%2Fi%2Fe4a6fa4f-894c-47a2-83ee-640f78e66b16%2F547.png&ho=https%3A%2F%2Fs3-us-west-2.amazonaws.com&s=938&h=d5b73d617990058b0b26851345fd0ebbb84136cf1b9e81a8af8b6e7414654280&size=980x&c=1180410140 crop_info="%7B%22image%22%3A%20%22https%3A//media.rbl.ms/image%3Fu%3D%252Fmedia.forumbee.com%252Fi%252Fe4a6fa4f-894c-47a2-83ee-640f78e66b16%252F547.png%26ho%3Dhttps%253A%252F%252Fs3-us-west-2.amazonaws.com%26s%3D938%26h%3Dd5b73d617990058b0b26851345fd0ebbb84136cf1b9e81a8af8b6e7414654280%26size%3D980x%26c%3D1180410140%22%7D" expand=1]
2.From design page -> go to the post page section
[rebelmouse-proxy-image https://media.rbl.ms/image?u=%2Fmedia.forumbee.com%2Fi%2F52b776d7-db0f-4e23-895e-f5540ee76848%2F547.png&ho=https%3A%2F%2Fs3-us-west-2.amazonaws.com&s=230&h=bf40707bb3cc7c6a6a75d15d3a406eff6f379153922436b5c75009d3e017a887&size=980x&c=2376540116 crop_info="%7B%22image%22%3A%20%22https%3A//media.rbl.ms/image%3Fu%3D%252Fmedia.forumbee.com%252Fi%252F52b776d7-db0f-4e23-895e-f5540ee76848%252F547.png%26ho%3Dhttps%253A%252F%252Fs3-us-west-2.amazonaws.com%26s%3D230%26h%3Dbf40707bb3cc7c6a6a75d15d3a406eff6f379153922436b5c75009d3e017a887%26size%3D980x%26c%3D2376540116%22%7D" expand=1]
3.Pick the section where you have the code that uses "require" from here
[rebelmouse-proxy-image https://media.rbl.ms/image?u=%2Fmedia.forumbee.com%2Fi%2Ff146959b-12af-40c5-86cb-fa098582b340%2F547.png&ho=https%3A%2F%2Fs3-us-west-2.amazonaws.com&s=176&h=fd2696e3941d7bce6052eae8dc60e359dbaebf97cf98a42a53aad1cbbfdb3b2c&size=980x&c=3139785841 crop_info="%7B%22image%22%3A%20%22https%3A//media.rbl.ms/image%3Fu%3D%252Fmedia.forumbee.com%252Fi%252Ff146959b-12af-40c5-86cb-fa098582b340%252F547.png%26ho%3Dhttps%253A%252F%252Fs3-us-west-2.amazonaws.com%26s%3D176%26h%3Dfd2696e3941d7bce6052eae8dc60e359dbaebf97cf98a42a53aad1cbbfdb3b2c%26size%3D980x%26c%3D3139785841%22%7D" expand=1]
4.From the code section of the widget, you can update it and replace it by " {{require}} "
[rebelmouse-proxy-image https://media.rbl.ms/image?u=%2Fmedia.forumbee.com%2Fi%2Fba87f298-0c46-431e-aca2-b4be2b70c879%2F547.png&ho=https%3A%2F%2Fs3-us-west-2.amazonaws.com&s=116&h=9ae56e73617a2cff20345b7fd1f5c356aaefc83b5dd1ddd42da7ae397ca380e4&size=980x&c=661122888 crop_info="%7B%22image%22%3A%20%22https%3A//media.rbl.ms/image%3Fu%3D%252Fmedia.forumbee.com%252Fi%252Fba87f298-0c46-431e-aca2-b4be2b70c879%252F547.png%26ho%3Dhttps%253A%252F%252Fs3-us-west-2.amazonaws.com%26s%3D116%26h%3D9ae56e73617a2cff20345b7fd1f5c356aaefc83b5dd1ddd42da7ae397ca380e4%26size%3D980x%26c%3D661122888%22%7D" expand=1]
5.After the change has done -> click save and you update will take effect
[rebelmouse-proxy-image https://media.rbl.ms/image?u=%2Fmedia.forumbee.com%2Fi%2F4b6d2102-2f71-4c01-9c38-55dc3ddeec0f%2F547.png&ho=https%3A%2F%2Fs3-us-west-2.amazonaws.com&s=472&h=0152c080ef422ed415309fd1f1a31c6b1d00facf5399ef48f3eaf9111220080a&size=980x&c=1157888309 crop_info="%7B%22image%22%3A%20%22https%3A//media.rbl.ms/image%3Fu%3D%252Fmedia.forumbee.com%252Fi%252F4b6d2102-2f71-4c01-9c38-55dc3ddeec0f%252F547.png%26ho%3Dhttps%253A%252F%252Fs3-us-west-2.amazonaws.com%26s%3D472%26h%3D0152c080ef422ed415309fd1f1a31c6b1d00facf5399ef48f3eaf9111220080a%26size%3D980x%26c%3D1157888309%22%7D" expand=1]