Back to categories

Category: "JavaScript"

Implement v-model in Vue.js Janne Kemppainen |

In Vue, the v-model directive is used to create a binding between an input or a component, and a data reference. This makes it possible to update the state of a value that is passed to a component. But how can you implement it yourself, especially if the value needs to be passed through a nested component?

Create a Web App with Vue 3, Tailwind CSS and Storybook Janne Kemppainen |

I’ve been doing some small scale frontend development for a while now, and I have to say that I’ve really grown to love the Vue.js framework. Combined with Tailwind CSS and Storybook it makes for a strong starting point for your next web app!

Fix NPM No Such File Error on WSL2 Janne Kemppainen |

I was working on a Node.js project and decided to run it on top of Windows Subsystem for Linux but it just wouldn’t work. The npm command would fail with a “no such file or directory error” like this:

Use Inquirer.js to Create a Conversational CLI User Interface Janne Kemppainen |

Your CLI apps don’t have to be boring. Especially when there are plenty of possible configuration options, and the program is not going to be executed from a script, it might be better to provide a conversational user experience.

Make an NPM Package Executable with npx Janne Kemppainen |

You may have used the create-react-app package and thought that you’d like to make your own NPM package work in the same way with npx. It’s actually quite easy.

Import ES6 Modules in Node.js Janne Kemppainen |

With the ECMAScript modules definition we can use the import and export keywords to load and publish library code. However, if you try to use them in your Node.js project you might encounter the following error: