Retrieving Node.js Module from GitHub - Error: ENOENT, open package/package.json'

前端 未结 3 1239
星月不相逢
星月不相逢 2021-01-17 11:24

To my understanding, the \'npm\' knows about git, so i can use it to retrieve Node.js modules from github. So, I have created Node.js module and hosted it at github. When I

相关标签:
3条回答
  • 2021-01-17 11:39

    You may be using a .zip file. NPM doesn't support it and it may throw an error. Here is what you can use: https://npmjs.org/doc/install.html#DESCRIPTION

    0 讨论(0)
  • 2021-01-17 11:49

    Does your repository contain a proper package.json file? That is required to have your repository handled as an npm module.

    0 讨论(0)
  • 2021-01-17 11:51

    For those who already have a package.json file:

    Just in case you didn't notice the comments below the accepted answer, you need to make sure you are inside your app folder to be able to run npm start. It seems to be a common mistake to accidentally run npm start from one directory above. Hope this helps.

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