Modules are destorying my program

In HTML when I put my main js file ad a type="module" so I can import modules in it the javascript breaks and won’t work all the functions won’t work at least and then when I try to remove it the webpage does not work because there is still an import in my js file so I remove that then I have no modules so what do I do? My program breaks when my script.js file is type=“module”.

import * as treeGrow from './script_tree_funcs.js';
<script src="script.js" type="module"></script>


(make sure to set it to 760p)

I’m going to guess that we will need to see some code to show what you mean?

I added it. Imma link a video to show what I mean

It doesn’t look like you are linking a module directly though?

What do you mean By that?

That looks like a script instead of a module?

Is this related: How to use javascript type="module" locally in browser - Stack Overflow

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.