Skip to content

Category: Questions

vue-cli – cannot build for development mode

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

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