does not provide an export named... module import
does anybody know whats going on, when i reload my page only sometimes i get this message :
when i import like this but when i import like this then it is working what is going on ?
when i import like this but when i import like this then it is working what is going on ?
9 Replies
Can you show us the code? This works as intended

Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
import() imports the default export under a default propertyUnknown User•4y ago
Message Not Public
Sign In & Join Server To View
i dont export with
default export {mymod}That second example is not working, you have the parentheses in the wrong place so
mymod is set to undefined. I think it would be undefined even with proper parentheses though. Please show mymod.module.jsUncaught SyntaxError: The requested module './mymod.module.js' does not provide an export named 'mymod'
mymod.js
the weird thing is that sometimes it works, sometimes it does not work when i dont await the import...
when i await the import it works every time
i think the problem lies within my webserver
sometimes i get the wrong response from the reuqest to mymod.module.js
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
thanks it cannot work because my webserver respond with the wrong file only sometimes
im currently switching from the
import { serveTls } from "https://deno.land/std@0.147.0/http/server.ts?s=serveTls"; to the native? Deno.listenTls , maybe this will solve my problem
ok im quite sure there was some async fuckery going on, now it is working , i did it like this