Code Error Help

I just encountered wix code with no coding background and I’ve been following the code example callout & highlight (https://www.wix.com/code/home/example/Callout-and-Highlight), but the output keeps on telling me this:
Cannot find module ‘public/showHide’ from ‘public/pages’
There was an error in your script
TypeError: n is not a function. (In ‘n()’, ‘n’ is null)

This is the code:
import {ShowDelayHide, ShowOneOf} from ‘public/showHide’;
let yellow, orange, red, green, captions;
$w.onReady(function () {
yellow = new ShowDelayHide(50, $w(‘#yellowImage’));
orange = new ShowDelayHide(50, $w(‘#orangeImage’));
red = new ShowDelayHide(50, $w(‘#redImage’));
green = new ShowDelayHide(50, $w(‘#greenImage’));
captions = new ShowOneOf(50, $w(‘#yellowGroup’), $w(‘#orangeGroup’), $w(‘#redGroup’), $w(‘#greenGroup’));
});
export function redHotspot_onMouseIn(event) {
red.show();
captions.show(2);
}
export function redHotspot_onMouseOut(event) {
hideAll();
}
export function yellowHotspot_onMouseIn(event) {
yellow.show();
captions.show(0);
}
export function yellowHotspot_onMouseOut(event) {
hideAll();
}
export function orangeHotspot_onMouseIn(event) {
orange.show();
captions.show(1);
}
export function orangeHotspot_onMouseOut(event) {
hideAll();
}
export function greenHotspot_onMouseIn(event, $w) {
green.show();
captions.show(3);
}
export function greenHotspot_onMouseOut(event, $w) {
hideAll();
}
function hideAll() {
red.hide();
orange.hide();
yellow.hide();
green.hide();
captions.hide();
}

I would really appreciate it if you can help me fix the error.
Thanks,
Bella

Hello Bella,
This example includes 2 code files, you just need to create a new " showHide .js" file under Public folder and add the relevant code here. And be sure that you are using right component names.
Switch to showHide file:

Editor view:

Thanks.

Thank you so much! It all works now :slight_smile: