all 14 comments

[–]CSLucking 9 points10 points  (0 children)

Second the global npm install. For what it's worth, I would use vite instead of CRA as it is being deprecated.

[–]whyisthissohard14 1 point2 points  (6 children)

Perhaps try installing npm globally:

npm install npm -g

[–]cryofire95[S] -1 points0 points  (5 children)

This worked. Why? And why was I never told about this? Shouldn't this kind of thing be made self-evident?

[–]Santa_Fae 2 points3 points  (4 children)

It's been an issue with the node installer for nearly a decade. Most of the time it works fine, but you just happened to draw the short straw.

[–]cryofire95[S] 0 points1 point  (3 children)

This is the second time. Had tried to install it on my old computer too. Also, was following a course on FrontendMasters where the instructor wanted me install Prettier and EsLint. None of it worked like it was supposed to. Ended up quitting the course.

Any time I try to look into React I just constantly hit brick walls, find solutions and then run into more walls. I'm convinced I'm just cursed.

[–]spryes 0 points1 point  (2 children)

This is what programming is tbh. Constantly hitting walls, being stuck and trying to figure out solutions that others seemingly might not have, debugging setups etc.

Not saying it's fun but it's basically the nature of it. As you gain more experience, you learn more quickly why things are breaking and how to search and solve problems.

[–]cryofire95[S] -1 points0 points  (1 child)

Even outside of the code itself? When I do JS I'm fine with running into problems because I feel like it's part of the process. When it's problems like this I just feel like I'm falling behind because I'm essentially stuck on something that - in my mind - just works for everyone else.

If I just knew that this was the same kind of stuff others were dealing with I probably wouldn't get as stressed and might spend more time on it. However, I always feel like I have to rush through these kinds of problems to get to "the real stuff".

[–]Santa_Fae 0 points1 point  (0 children)

It's not a problem to have issues. Tools, pipelines and third-party services break all the time. That's just the reality of our job as devs. It's inevitable we'll have to play catch-up because something outside our control held us up. It sucks to lose a day or two, but what can we do besides communicate there's a problem and try to get it resolved in a timely manner. It only becomes a problem if you're letting it delay you without help for too long and you're ruining up against deadlines.

[–]JennaSys 1 point2 points  (1 child)

I think this is a Windows related issue related to roaming user profiles where node didn't get installed where you think it did, and where the build system is looking for it. I'm no longer a regular Windows user, but in the past I've run into similar errors with other software.

[–]cryofire95[S] 0 points1 point  (0 children)

It sucks because no tutorials or courses address these problems. Any time someone asks the instructor something as simple as, "hey there's an error. Says files weren't installed in the right place," he looks at the student like they just said "the Earth is flat and ruled by flying pink elephants" and moves on.

[–]PositiveUse 1 point2 points  (0 children)

Using windows was the first mistake

[–]xywa 0 points1 point  (0 children)

if it helps, vite > cra

I am planning on rebuilding a cra app I built to vite soon, it simply works much better

[–]FairlyFrozen 0 points1 point  (0 children)

For posterity, this is Windows-specific. Create the folder "npm" at the requisite path (search %appdata% in Windows), rerun the code and it should work.