Setup concurrently in your MERN backend(Yarn)

Samuel Lucas
Road to fullstack(MERN)
2 min readSep 9, 2020

--

Once upon a time I bought an Udemy course on MERN stack and it was a very good one. Everything went on smooth until the point I wanted to implement concurrently and the app broke. It was a terrible experience as I googled and googled and googled…many minutes later(still googling 😃) for solution. At the end of the day, I figured out how it could be done, thanks to 😍

You can visit the link to get the gist or just keep on reading to …yeah you’re right, get the gist. 😉

Most of the time, you’ll get the setup for npm and not yarn and that is not so annoying as not telling you it doesn’t work for yarn, which is why I’m telling you that it doesn’t 😄. Below is an image of what you get most of the time:

npm-concurrently

Now, how do you set it up for yarn? It’s quite simple.

If you use yarn as your package manager, you have to tell it the directory path for the client side code with --cwd.

yarn-concurrently

There you have it, your app not breaking due to this “whatever” again.

Thank you for taking your time to read through this post. If you found it helpful, please give it a clap. Bye

--

--

Samuel Lucas
Road to fullstack(MERN)

Writer and developer based in Nigeria. On Medium, I write about JavaScript and web development 💻