Is it possible to install package from git repository from downloaded .zip file in npm?

前端 未结 2 607
萌比男神i
萌比男神i 2021-01-03 09:09

I\'ve downloaded manually master branch of repository via Download ZIP button on GitHub. Now, my question is:

Is it possible to install

相关标签:
2条回答
  • 2021-01-03 09:54

    It doesnot work with the github zip download unless you unzip the package with his name as the main directory and request the installation with npm on this root directory

    Example

    download material-design-icons from github
    unzip to the directory of your project (or c:\tmp) 
    npm install  ./material-design-icons
    

    or npm install c:/tmp/material-design-icons

    It work nicely and fast!

    0 讨论(0)
  • 2021-01-03 09:59

    Try this :

    npm install ./package.zip
    

    Reference: https://docs.npmjs.com/cli/install

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