npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'

前端 未结 15 676
隐瞒了意图╮
隐瞒了意图╮ 2020-12-12 23:19

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

相关标签:
15条回答
  • 2020-12-13 00:20

    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
    
    0 讨论(0)
  • 2020-12-13 00:20

    Make sure you are on the right directory where you have package.json

    0 讨论(0)
  • 2020-12-13 00:22

    Run command - npm init No file directory found issue got resolved

    0 讨论(0)
提交回复
热议问题