teleren/devto huggingface dataset:
Fixing "env: node
: No such file or directory" on mac for an npm package
Tags: node
Published: 2021-05-18 14:36:35

---
title: Fixing "env: node\r: No such file or directory" on mac for an npm package
published: true
date: 18/05/2021
tags: #node
canonical_url: https://darraghoriordan.com/2021/05/18/env-node-r-no-such-file-or-directory/
---

If you install an npm package using yarn and you get this error it means that the package author is using windows line endings and node on mac can’t run the script as expected.

```
env: node\r: No such file or directory
```

To fix it you need to change the line endings. But you need to ensure this happens after each install of packages!

<!-- end excerpt -->
## How to change line endings on npm package install

Note: You won’t get this error if you use npm because npm automatically processes the line endings for you!

The trick for us yarn users is to use the `crlf` package to modify the line endings for the package.

You can add a script to the prepare script. This will be run after every install.

This example fixes line endings in the jira-prepare-commit-msg package.

```
  "prepare": "npx crlf --set=LF node_modules/.bin/jira-prepare-commit-msg"
```
Should you follow TDD?
Published: 2021-05-21 08:43:17

---
title: Should you follow TDD?
published: true
date: 2021-05-18 00:00:00 UTC
tags: 
canonical_url: https://vivekpandey.live/blog/Jekyl-detailed-guide/
---

If you haven’t heard of TDD, it means Test Driven Development. What do I mean by that? Let’s talk about it today.

## Let’s make sense

Test-driven development (aka TDD) is a three-step process. It’s often referred to as the “red, green, refactor cycle”

![TDD Representation Image](https://vivekpandey.live/blog/images/TDD.png)

Let me explain the process:

- **Red** : It involves writing a function to test a feature which you’re going to add in the project/app. It’ll fail onbviously and you get a red error message.

- **Green** : Next up, we add the functionality/feature to the app in-order to pass the test and you get a green success message.

- **Refactor** : Now we need to look at the code and refactor it to ensure it’s well-written, and easy to read/understand.

> You repeat the same process over and over again until you have added all the required functionality.

**Bonus:** Using this cycle saves you if you break something while implementing other functionalities.

## When does it make sense?

- **Utility Functions** : If I’ve a function which has a certain set of inputs or ouputs, and of a certain complexity. I prefer setting up a test for it.

- **Well defined UI** : If I’m trying to achieve certain UI goals in my app, I prefer setting up a test for it.

- **Fixing a bug** : This also helps me in replicating the issue so that I can understand the problem better.

### But when it doesn’t?

- When you’re learning about new features and implementation (aka exploratory coding), I wouldn’t follow this cycle.

- It is waste of your precious time if you’re testing the implementation details.

## My conclusion

Go follow TDD if you believe you’ll be working on the project in the long run. Because I believe **Time** is an important resource, and you should utilize it to the fullest. Good luck!

Originally posted on: [Vivek's Blog](vivekpandey.live/blog)
Why I am switching careers
Tags: beginners
Published: 2021-05-17 23:53:54

About a month ago I started the Flatiron Software Engineering bootcamp. While I have definitely been struggling with imposter syndrome while learning to code, I have to keep reminding myself why I am doing this. 

I have been a professional artist for about 7 years now. I have done everything from Puppet Fabrication, to Graphic Design. At the beginning of the pandemic I lost my job. While most traditional art jobs were non existent after the pandemic, I thought I would be able to get a remote graphic design job. However, almost every graphic design job I applied for wanted HTML, JS, and CSS knowledge. I tried teaching myself a little bit but was so out of my depth. I was able to get a few freelance jobs starting in November of last year and found that all the jobs were in unsafe work conditions and paying way less than before the pandemic. Even my old boss with 40 years of experience was making $20 an hour. It was a real wake up call that staying in the arts was not a way to survive. I was also developing severe allergies to the chemicals I was constantly using. Some of those chemicals were even linked to brain cancer, which is definitely something I want to avoid. All of these factors led me to the decision that a career change was in order.

Now, why Software Engineering? My partner was a big reason for this decision. A bunch of their friends in the last three years did the coding bootcamps with great success and said it was the best decisions of their lives. I figured with being detail orientated and having to problem solve a lot in my previous jobs that my skills would transfer in a way. I also wanted a more stable career that isn't dying. I also wanted a job were benefits would be included. As a person with multiple chronic illnesses, having good insurance is vital. Also with having to learn HTML, CSS, and JS to continue Graphic Design anyways, I figured I would be able to bring Graphic Design to the Software I design. 

I am excited and nervous for this career change and can't wait to be part of this community.
Cloud Practitioner Certification exam tips.
Tags: aws, cloudpractitioner, certification
Published: 2021-05-17 23:25:51

# Exam tips

As my last post, I am starting my AWS Cloud Practitioner certification journey this year but haven't made significant progress.

I thought sharing my learning publicly would give me more accountability to continue.

Here are my notes on my journey while preparing for my AWS Cloud Practitioner Certification.

## Know the 6 advantages of Cloud Computing

1. Trade Capital Expense for Variable Expense
2. Benefit from massive economies of scale
3. Stop Guessing about capacity
4. Increase speed + agility
5. Stop spending money running and maintaining data centres
6. Go global in minutes

## Know the 3 different types of Cloud Computing

1. Infrastructure as a service (IAAS)
2. Platform as a service (PAAS)
3. Software as a service (SAAS)

## Know the 3 different types of Cloud Computing deployments

1. Public cloud (AWS)
2. Hybrid = public + private deployments
3. Private Cloud = on prem servers

## Progress

6% Complete.
Simple guide of Flexbox in Real Life🔥
Tags: flexbox
Published: 2021-05-17 23:15:40

Flexbox is an interesting way to make layout At least better -as I see- compared to float's and other techniques.

So, in this article I'll explain how to use <strong>flexbox in real life</strong>🔥

<h2>The first action</h2>

The first step is writing <code>display:flex</code> in the father container, then you should write some other lines of code using properties like <code>flex-direction</code> and others that I tell you about next.

<h2>Flex-Direction is so basic but it's important</h2>

This properti sets the direction in which our child elements are shown. We have these:

<code>row</code>: this value order our child elements in rows from left to right 
<code>row-reverse</code>: this value order our child elements in rows from right to left 
<code>column</code>: this value order our child elements in rows from up to down 
<code>column-reverse</code>: this value order our child elements in rows from down to top

<h3>Small mention to the <code>order</code> property😼</h3>

So, this property is useful to order our child item through numbers ID but I've never used this property, ordering your elements correctly in the HTML is's enough.

<h2>The <code>grow</code> property, this is really important </h2>

Besides being important, this property it's so useful in the Real Life(☞ﾟヮﾟ)☞

With this property we can establish the size of our child items so easy, assigning numerical values and the elements can shrink or grow according to the highest or lowest value, lowest to shrink, highest to grow.

A taste of the flexibility of flexbox🤖

Early PD:In this article I write about the most used properties used in Real Life if I forget any, let me know in the comments.

<h2>The King of Flexbox:<code>justify-content</code>🤴🏽</h2>

So, let's talk about important things, this property is the King and father of the other properties, it's so important and attractive that for me it's the best property in Flexbox.

I'm going to explain to yoy how this property works, thorugh two images:
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/orzj370uein1siuuxdct.png)
<br></br>
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n0e90umzu4iow8s6zd9j.png)
PD: Sorry, this article is just part #1, in two days I'm going to publish the second part of Flexbox in Real Life🔥📚
📈 How to Scale Quickly with Identity
Tags: security
Published: 2021-05-17 22:22:26

#### 📕 Learn how the right customer identity and access management (CIAM) solution helps you achieve scalability and provide consistent, reliable service.

### <br>

In the last few years, identity has become a familiar concept to business decision-makers seeking to fortify their security, unlock efficiency gains, and outpace competitors.

[Customer identity and access management (CIAM)](https://auth0.com/blog/what-is-ciam/) is a set of solutions built to help organizations balance convenience, privacy, and security for every type of user who needs access to their platform. At Auth0, we’ve heard from our customers that investing in third-party CIAM solutions can benefit the entire organization, especially by:

* Providing a seamless, secure customer experience
* Protecting against expensive data breaches
* Guiding compliance with data privacy laws
* Gathering customer data into a single source of truth
* Increasing the success of digital transformation projects

Another major advantage to CIAM is that centralizing customer identity helps you build more scalable solutions — and scalability is both a benefit of and a requirement for the advantages listed above. Simply put, CIAM gives you the tools you need to scale identity quickly.

![The Business Value of Scalability](https://images.ctfassets.net/23aumh6u8s0i/BXZTiwu81LfqqP7O3yEmj/a66340c22f87e48739da621e7e46cdf6/02_B_power.jpg)

[Read more...](https://auth0.com/blog/how-to-scale-quickly-with-identity/?utm_source=content_synd&utm_medium=sc&utm_campaign=ciam)
How to Protect Cookies Against Common XSS Attacks on the Web?
Tags: webdev, cybersecurity, security
Published: 2021-05-17 21:58:30

We can ignore Cookies danger by just not recommending its usage, but the fact is that [at least 55% of all the websites](https://w3techs.com/technologies/details/ta-googleanalytics#:~:text=google%20analytics%20is%20used%20by%2084.8%25%20of%20all%20the%20websites%20whose%20traffic%20analysis%20tool%20we%20know.%20this%20is%2055.2%25%20of%20all%20websites.) use Cookies RIGHT NOW even with lots of existing cookieless strategies.

So how to protect Cookies against Common XSS Attacks?

Well, if your app really needs to use Cookies, configure each one  through [Set-Cookie HTTP Header](https://developer.mozilla.org/pt-BR/docs/Web/HTTP/Headers/Set-Cookie) with at least the following flags:

🍪 `Secure`: To allow the Cookie only through HTTPS

🍪 `HttpOnly`: To remove the Cookie from the [document.cookie](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie)

🍪 `SameSite`: To limit the Cookie context usage

```bash
Set-Cookie: Secure;HttpOnly;SameSite=Strict;...
```

Hope that with these tips, your app now has a few more chances against XSS Attackers that use Cookies breaches. Anyway, keep in mind that complex attacks can easily bypass these tips. So try to migrate ASAP to cookieless strategies.
Day 368 : Hope
Tags: hiphop, code, coding, lifelongdev
Published: 2021-05-17 21:56:42

_liner notes_:
- Saturday : Had a good day! Got ready for the radio show and then had the radio show. It was a good time. Afterwards, I did all the post show work and ended the night watching the final episode of "Yasuke". The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of an illustration of Elon Musk in a space helmet riding a doge dog to the moon with the words May 15th 2021 Performative](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8pbwf9bqbk1mmi2cawf6.jpg)

- Sunday : Pretty productive day. Cleaned up around the van and threw out the trash. Worked on my side project. Added some data to the database and created an endpoint that my side project can display in a Web Component. Set up the promo posts for the radio show. Did a couple of more things on the site. Watched "Fear The Walking Dead" and "Gangs of London" and called it a night.

- Professional : Finally put the finishing touches on the video template for a tutorial. Think it looks really good and will be easier to build on later if something needs to be updated or changed. Had our team meeting and after got to catch up with another manager. Got to show them some of the side projects I've worked on.

- Personal : Think I'm getting pretty close to launch the front page of my new project. All the pages are done. I just need to add some copy to the front page and set up the push notification stuff.

![View from a lake looking at the shore with a forest of pine trees and cloud covered mountains in the background in Maligne Lake, AB, Canada](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/shwzfehfw7atc6a41vpo.jpg)

Going to work on my side project. Really need to get the front end done and launched. Hope to have that done in a couple of days. There's a lot in the other parts I need to work on. Still trying to make the early June deadline I set for myself. Yeah, that's pretty much it for tonight.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube jHcQ0z_WPR8 %}
Brave vs. Edge vs. Opera
Published: 2021-05-17 21:38:01

# What do they all share

They are all Chromium-Based browsers.

# Opera

  - Opera has performance features, marketed to a gamer audience. You do not need to worry if some tab is eating your CPU. You don't need to install an extra ad-blocker to block potentially crypto-mining websites;
  - Opera has built-in interface for social media like Twitter; As a developer, I'm completely not a fan as it adds bloat. But might be useful for someone who works heavily with social media;
  - Opera doesn't have profiles, which is a big NO. For my use cases, profiles are interesting if you have multiple Google, Bitbucket etc accounts for personal and work use. Very useful if you need to log in with non-personal enterprise accounts too.

# Brave

  - The biggest plus in Brave is that it has built in blockers, which help with performance; Brave wants to fight the ad and tracking economy.
  - Brave wants to promote its "Attention Token" (BAT), which aims to be a monetization alternative;
  - BAT is a cryptocurrency, and does some fair usage of your CPU to work (EDIT: not anymore. BAT is now farmed with browser ads);
  - Brave makes compromises for privacy. Some behaviours are limited. For instance, they don't have an internal PDF reader, their dev tools also has features cut from the original Chrome Dev Tools. Some files had no syntax coloring, for instance;
  - (edit) Brave shows its own ads in notifications (can be disabled) and on its new tab. A bit weird.

# (new) Firefox

  - Firefox feels considerably faster than any other Chromium Browser, since its a different revamped engine;
  - Font rendering is a bit different;
  - IMHO: The main downside on Firefox are its Dev Tools. They used to be considerably worse then Chromium's, but now are much closer.

# Edge

Edge is my main browser since launch. I have tried both Brave and Opera before in order to replace Chrome, but they didn't stick.

  - Edge is faster than Chrome. I don't really use side tabs, share, or collections but they are interesting and non invasive; Its reader mode and screen capture work well;
  - I didn't miss anything from Chrome's DevTools. And they actually add more things on top of it;
  - Addon compatibility is great. If you can't find the addon you want in the Edge store, you can install it from the Chrome store;
  - It sleeps inactive tabs and it shows tabs separately on alt+tab (can be disabled);
  - Although Edge is clean, it seems it walks in the way of feature bloat. It has added a "detect store coupons" feature that didn't catch well for me;

My main goal with replacing the main browser was to have the same featureset Chrome had, but with higher performance, and maybe slightly better UX. So Edge won me.

The second contender to me, very close, is Firefox.

If you don't need to use profiles, Opera might be interesting.

Brave might be your case if you prioritize leaner website loading (less tracker requests) and you want to help fighting the surveillance economy.

Edge is a straightforward replacement for Chrome, its unlikely that you will miss anything from Chrome on Edge, especially on the DevTools department.
Webpack "there are multiple modules with names that only differ in casing"
Tags: programming, node, react
Published: 2021-05-18 07:33:55

---
title: Webpack "there are multiple modules with names that only differ in casing"
published: true
date: 2021-05-17 20:41:24 UTC
tags: programming,nodejs,react
canonical_url: https://siderite.dev/blog/webpack-there-multiple-modules-with-names-that-onl/
---

  So you go into Visual Studio Code, fire up the terminal, run _npm start_ and suddenly you see these ugly warning all over the place, when no code was changed and it had worked before. WTH?!

  And of course, the first thing you do is google the error "_there are multiple modules with names that only differ in casing_" and click on the [first StackOverflow link](https://stackoverflow.com/questions/47534267/webpack-there-are-multiple-modules-with-names-that-only-differ-in-casing-but "Webpack: “there are multiple modules with names that only differ in casing” but modules referenced are identical") found and you find the exact problem that you have. But [the leading answer](https://stackoverflow.com/a/47632275/4572240 "This is usually a result of a minuscule typo. For instance, if you are importing your modules like import Vue from 'vue',") was completely misleading for me.

  Here is my scenario: I have a folder that is a clone of a Git repo. I had added another folder with a completely new React application to the same repo, meaning I have to open Visual Studio Code in the main folder, but then change directory in the terminal before I can run commands like _npm start_. And what I did was do a simple _cd myappfolder_, like I would normally do and noticed in passing and immediately dismissed that the path in the terminal is now shown as _MainFolder/myappfolder_ and not _MainFolder/MyAppFolder_ as it is on the disk. And that was the exact issue! All I had to do was _cd ../MyAppFolder_ and the annoying warning disappeared.

  To be fair, that's actually [the second answer](https://stackoverflow.com/a/53901224/4572240 "Ensure that the path you used in your terminal has the correct capitalization. For example if you're using git bash on Windows and your project has the following path:") for the SO question, but it did make me waste a few minutes looking at import statements. **Lesson learned: when you change directory from the Code terminal, use the Tab autocomplete feature to get disk paths with their actual capitalization!**

**  ** And it's clear that this ridiculous issue has caused others a lot of grief, too, as the same answer was rewarded with +50 SO points by someone. Me, being a cheap bastard, I am not doing that.
Lean on your Support Network
Tags: motivation, career
Published: 2021-05-17 19:49:16

![Motivation Monday](https://f.hubspotusercontent40.net/hubfs/7320745/LearningJourney-GetSupport-1.png "Motivation Monday")

You won't always have the right answers... that's normal and okay. The road to success is not paved by doing everything on your own.

💡 **One of our Treehouse Values is:** "Learning fast is better than being right".

> ## "Don't be afraid to ask questions. Don't be afraid to ask for help when you need it. I do that every day. Asking for help isn't a sign of weakness, it's a sign of strength. It shows you have the courage to admit when you don't know something, and to learn something new." 
– Barack Obama

---

### 💚 Build your Support Network

One of the keys to success is knowing when you need support and being brave enough to reach out for help. 

Your loved ones, family, and friends are an integral part of your Support Network as you strive toward your learning and life goals. Know that they are there for you... and that it's okay to lean on them.

Join or create a community of designers or coders that you vibe with. Ask questions and share your challenges. You'll be amazed at how quickly your skills and understanding will grow.

And remember... when others reach out to you for support... return the love and keep the support flowing. When we support each other... we learn, grow, and build a more empowered world.

---

## 💬 Join the conversation

Who and/or what community is a big part of your Support Network? **Leave a comment below!**