Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Sheila Anguiano
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Sheila Anguiano
Full Stack JavaScript Techdegree Graduate 35,239 Points

React Router 4 Installation Files [2021]

With the constant updates of modules and operatives systems, it seems that you always need some time to make the project files work, so if you have problems, this might help you:

1- First things first, my the setup ( because not everyone is using the same OS and version of things, and this might affect if you have more issues):

  • Mac running MacOS Catalina 10.15.7
  • npm v6.14.10
  • node v14.15.1

2- After downloading the files, I opened them using Visual Studio Code, I ran npm install on the terminal, and after npm finished installing all packages (a lot of them deprecated) I tried to run npm start which throw the following error:

TypeError: fsevents is not a constructor

fsevents seems to be a package that gives "Native Access to Mac OS-X FSEvents", and after reading several recommendations on StackOverflow, I used

npm i fsevents

this installs the fsevents package and solves the problem.

I hope this saves you some time :)

1 Answer

Lee Vaughn
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree seal-36
Lee Vaughn
Treehouse Teacher

Hi Sheila Anguiano!

Thanks for sharing this tip and kudos for including your system info!

Would you mind linking the specific lesson this tip is related to so that we can dig a little deeper into possible updates that might need to be made? Thanks!

Lee

Sheila Anguiano
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Sheila Anguiano
Full Stack JavaScript Techdegree Graduate 35,239 Points

Hi Lee Vaughn,

Sure thing, this is for the course React Router 4, which is part of the React Track.

If I may add, it seems React Router is in the process of releasing it's 6 version so, the course might need a slight refresh, since I also notice other comments mentioning a new syntax for declaring routes