If you include some more details, like what your embedding code looks like or what (if any) errors there are in the browser console, it might be possible to come up with a better answer.
Sorry it was my fault. What I learned from this error was that –
Never declare some javascript resources in the UI like this @JavaScript({“vaadin://js/example.js”})
and never forget to include or don’t include that resource in the src → main → webapps ->vaadin → js