I have a .env file in my project package.json When I run npm run build for the first time, it works. When I run it after that, it shows error: When I dig into the logs After I delete the public folder, it suddenly works Answer After I update the outputDir from public to build, it works. vue.config.js
Category: Questions
How can I save checkbox state to my database?
I’m trying to create a Todo-list app using (nodejs,ejs…) so for every todo I create a checkbox. If someone finishes his job and uses the button bin recycle to delete it, I save that using MongoDB but I’ve a problem when checking. When I reload the page this checked box disappears. In other w…
D3 events in new versions
I have written the following snippet: I am aware that the d3.event has been removed in new releases, but reading through the documentation on how to handle the events in callbacks does not make me understand how to modify this… Can someone please explain this tiny bit to me and how to fix it to work, in…
How to add an item to the cart
I don’t really understand this function, like what does the “cartItems.push(…product, count:1)” actually do? I am a begginer and it’s hard for me to understand these logic. It’d be kind of you guys to help me to explain! Thank you so much! Answer Here’s a breakdown, s…
Create a +1 Animation when button is clicked
I was making a game where you get money for clicking on a button. Here’s a part of it: Later i was looking in the Internet and i found a website called Cookie Clicker and i saw this animation that when you click the cookie, a +1 is going up and fades away (It is not so important that the
How to get entry from MYSQL depending on the entered url?
What I want to achieve is something like Wikipedia is using: You enter “wikipedia.org/wiki/Stack_Overflow” into your browsers search bar and wikipedia shows you the article for “Stack_Overflow”. I know I could do something using php’s GET and www.website.com/article.html?article_…
I’m confused about this statement, Object.entries
I’ve been watching the video, over and over again but I can’t seem to understand it properly, can somebody help me explain this line by line? I’ve get the point about “cat &&” but the rest confuses me. Answer Going through the above code line by line: I am assuming you ha…
How to convert nested array of objects into one array of objects using javaScript?
I have array which contains affiliate arrays, I don’t want to access children of the array by index, my aim is to merge this data and and get the following result: [{id:’11223′, price:92},{id:’92221′, price:90}], What is the best way to achieve this? Thanks. Sum of the final reul…
Why e.repeat is not working and have no errors in the console?
this code stores when any of the ‘q’, ‘w’, ‘a’, ‘s’ key is clicked in an array. this works fine until I click and hold any key which results in repeated input. for dealing with this I used if (e.repeat) { return } but this is not working and does not give any er…
getting error while trying to play Audio from URL in chrome extension
I tried many ways to play a sound from the URL but it isn’t working. When I inspected the page have errors console: chrome-extension://invalid/:1 GET chrome-extension://invalid/ net::ERR_FAILED Uncaught (in promise) DOMException: Failed to load because no supported source was found. manifest.json: IR…