Reputation: 1864
Is there a way to regenerate a package.json
file from the source code, I have cloned a work repo but the other developer had .gitignore
file as this:
.gitignore
node_modules/
.env
package-lock.json
package.json
*.json
Hence I have the source code but I can not run it until I have all the dependencies. How could I achieve this? I tried
npm init -y
npm i
But it did not install the dependencies
Upvotes: 1
Views: 2054
Reputation: 70
I think the shortest way to solve this is to go through the code and find the required packages, then install them via NPM i.
Upvotes: 2