3

Simple issue I have a folder where i created a react application via node.js and npm. As normal the creation of the react app also created a package.json and a package-lock.json file. A while after i installed react router dom now i have a second package.json and package-lock.json file a folder above my project.

Should i just leave this as it is, is there a way to merge these, can this cause any errors? Image of the Folders and files

2 Answers 2

3

You probably ran npm install a directory above instead of running it into the project directory itself.

If there's only one package and that is react-router in the package.json newly created, I recommend deleting them and installing the package again in the frontend project directory.

Sign up to request clarification or add additional context in comments.

Comments

0

You must have installed the new packages outside your current directory/folder, so cd into your current directory/folder and reinstall your dependencies.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.