Per your request I am supplying code but at a new URL:
https://robertmillward.wixsite.com/demo2
The error message is very similar.
I’m not sure if the xyz folder and xyz.js is required to cause the problem.
Also, there is a file in the pqrFiles folder which contains just comments.
Except for the add(6,7) in $w.onReady(), this is all Wix code.
********** Home screen code, Wix default plus one call to add
// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import add from ‘public/pqrFiles/pqr1.js’;
$w.onReady(function () {
//TODO: write your page related code here…
add(6,7);
});
********* Wix default code
// Filename: public/pqrFiles/pqr1.js
//
// Code written in public files is shared by your site’s
// Backend, page code, and site code environments.
//
// Use public files to hold utility functions that can
// be called from multiple locations in your site’s code.
export function add(param1, param2) {
return param1 + param2;
}
// The following code demonstrates how to call the add
// function from your site’s page code or site code.
/*
import {add} from ‘public/pqrFiles/pqr1.js’
$w.onReady(function () {
let sum = add(6,7);
console.log(sum);
});
*/
//The following code demonstrates how to call the add
//function in one of your site’s backend files.
/*
import {add} from ‘public/pqrFiles/pqr1.js’
export function usingFunctionFromPublic(a, b) {
return add(a,b);
}
*/
*********** Wix default code:
// Filename: public/xyzFiles/xyz1.js
//
// Code written in public files is shared by your site’s
// Backend, page code, and site code environments.
//
// Use public files to hold utility functions that can
// be called from multiple locations in your site’s code.
export function add(param1, param2) {
return param1 + param2;
}
// The following code demonstrates how to call the add
// function from your site’s page code or site code.
/*
import {add} from ‘public/xyzFiles/xyz1.js’
$w.onReady(function () {
let sum = add(6,7);
console.log(sum);
});
*/
//The following code demonstrates how to call the add
//function in one of your site’s backend files.
/*
import {add} from ‘public/xyzFiles/xyz1.js’
export function usingFunctionFromPublic(a, b) {
return add(a,b);
}
*/
// END of supplied code