# Chapter 2 setting up environment

**URL:** <https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397>\
**Category:** React\
**Created:** [August 15, 2022, 9:40am UTC](https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397 "2022-08-15T09:40:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fathima](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@Fathima](https://forum.codewithmosh.com/u/Fathima)\
**Post date:** [August 15, 2022, 9:40am UTC](https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397/1 "2022-08-15T09:40:32Z")

</div>

sudo npm i -g create-react-app@1.5.2

npm WARN deprecated tar@2.2.2: **This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.**

what is the upgraded version in 2022

changed 66 packages, and audited 67 packages in 2s

1 package is looking for funding

run `npm fund` for details

2 **high** severity vulnerabilities

Some issues need review, and may require choosing

a different dependency.

Run `npm audit` for details.

---

<div class="post-metadata">

**Author:** ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)\
**Post date:** [August 15, 2022, 2:32pm UTC](https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397/2 "2022-08-15T14:32:45Z")

</div>

That version of create-react-app is very old so you should probably try a newer version.

---

<div class="post-metadata">

**Author:** ![Fathima](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@Fathima](https://forum.codewithmosh.com/u/Fathima)\
**Post date:** [August 15, 2022, 2:44pm UTC](https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397/3 "2022-08-15T14:44:15Z")

</div>

But I am new to React. So I am stuck at the second chapter

---

<div class="post-metadata">

**Author:** ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)\
**Post date:** [August 15, 2022, 3:10pm UTC](https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397/4 "2022-08-15T15:10:58Z")

</div>

Not sure what to tell you. You can try to force all of your dependencies to work with a very old version by downgrading them all to be compatible or you will have to upgrade create-react-app by dropping the @1.5.2 from the install command.

---

<div class="post-metadata">

**Author:** ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)\
**Post date:** [August 15, 2022, 3:12pm UTC](https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397/5 "2022-08-15T15:12:08Z")

</div>

So this is how you install a newer version of create-react-app:

```auto
sudo npm i -g create-react-app

```

---

<div class="post-metadata">

**Author:** ![UniqueNospaceShort](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/uniquenospaceshort/32/1814_2.png) [@UniqueNospaceShort](https://forum.codewithmosh.com/u/UniqueNospaceShort)\
**Post date:** [August 16, 2022, 11:06am UTC](https://forum.codewithmosh.com/t/chapter-2-setting-up-environment/14397/6 "2022-08-16T11:06:01Z")

</div>

Hi,

You have 2 approaches.

- Respect the versions given by Mosh. This will give you the kind of messages you get.
- Go with the latest versions. This will give you other kind of messages anyway at some point.

Just go with the last version as most people seem to do and @jmrunkle suggests. This makes pretty much sense. You don’t want to use outdated versions that are certainly full of bugs and securit holes that have been fixed in the mean time.

One of the common errors you will meet later is updating `bcrypt`. There are several topics on that matter in here. If by then this do not appear anymore then you’re all good.

Don’t worry. Use the latest version. At some point update bcrypt when needed.

You can check outdated packages with `npm outdated` and update them as simply as `npm update`.

Regards.
