I just want to install socket.io to my project which is located on 3.chat folder. But when I run following command it shows following Warnings.And its not created a node_mod
NOTE: if you are experiencing this issue in your CI pipeline, it is usually because npm runs npm ci
instead of npm install
. npm ci
requires an accurate package-lock.json
.
To fix this, whenever you are modifying packages in package.json
(e.g. moving packages from devDependencies to Dependencies like I was doing) you should regenerate package-lock.json
in your repository by running these commands locally, and then push the changes upstream:
rm -rf node_modules
npm install
git commit package-lock.json
git push
Make sure you are on the right directory where you have package.json
Run command - npm init No file directory found issue got resolved