After successfully importing a js file with three.js code into a standard HTML file, I attempted to export/import the code from the external JS file and call it from mounted. However, when doing so, I received an error message stating: "ReferenceError: THREE is not defined."
Here is a link to my code for reference:
https://i.sstatic.net/Os6Yf.png
This error appears to be a reference issue, similar to a missing package in Java. But why is it occurring if the 'package' is being used in the external JS file? And how can this be resolved?