Npm ERR! errno -4058 - This is related to npm not being able to find a file

I’m trying to install node modules so I can use JSX and React to build a website application. However anytime I do npm install, I get this error which prevents me from installing the correct programs

If any one could help me solve this problem, I would gratefully appreciate it!

You need to have a package.json file that describes the project before you can install anything. You can create this file either manually or using npm init.


Alright, let me try setting that up real quick, I will mark you as a solution if it works and share the code.

You were right, I did npm install vite@latest. After doing so, it installed all the dependencies to create a working package.json file. Then I ran npm install, and it had worked. Thank you, very much.
Screenshot 2023-11-03 114538

Screenshot 2023-11-03 114727

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.