Skip to content

Tag: javascript

Trying to append a div to the document using vanilla js

I am trying to append a an element to the document with vanilla JavaScript but it’s giving me this error: “Uncaught DOMException: Failed to execute ‘createElement’ on ‘Document’: The tag name provided (”) is not a valid name.” This is all my js code: Answer docu…

Electron – How to add external files?

I have an Electron app. I try to make the app open an .exe file. I created a directory in the root folder named lib and placed the .exe file there. In development, I have no problem opening the file by using __dirname + ‘/lib/file.exe, but when I package the app (using yarn dist), it does not open the e…

Export default was not found

I have a Vue 2 project, and I’ve written a simple function for translating months in dates, which I would like to import in one of my components, but I’m getting an error: export ‘default’ (imported as ‘translateDate’) was not found in ‘@/utils/date-translation’…