npm - tarball data for material-design-icons seems to be corrupted

前端 未结 7 1228
野性不改
野性不改 2021-02-08 07:24

I\'m having this error while running a npm install material-design-icons@3.0.1:

tarball data for material-design-icons@3.0.1 (sha1-mnHEh0chjrylHlGmb         


        
相关标签:
7条回答
  • 2021-02-08 08:06

    " If you are on windows env, I fixed it by running the cmd as administrator "

    • This worked for me. However, chromedriver was not installed. So, i installed it separately using the command 'npm install chromedriver'.
    0 讨论(0)
  • 2021-02-08 08:07

    I resolved this with the command: npm cache verify which output:

    Cache verified and compressed (C:\Programs\DCPS\npm-cache\_cacache):
    Content verified: 1344 (164824963 bytes)
    Content garbage-collected: 1 (3491551 bytes)
    Index entries: 1522
    Finished in 8.187s
    

    The line that stands out to me is: Content garbage-collected: 1 (3491551 bytes)

    Does this sort of thing happen because a new version of a package is published to npmjs without a version bump?

    0 讨论(0)
  • 2021-02-08 08:13

    Well I could not resolve this problem with a lot of tries so I made the download of the github ZIP, unzip and install and it worked !

    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
    
    0 讨论(0)
  • 2021-02-08 08:16

    Finally, I got this fixed by:

    • Removing node_modules folder
    • Running npm update
    • Running npm install

    As far I understand, the npm update should have updated the package.json file, but all dependencies kept the same versions as we had it before.

    0 讨论(0)
  • 2021-02-08 08:18

    You need to confirm whether the Typescript is installed and after installing typescript it worked for me

    running the below comment will show the typescript version

    tsc -v
    

    If it shows some error install the typescript

    npm install -g typescript
    

    If then typescript is installed you can try checking the Angular Cli version

    ng --version
    

    If it shows some error then install Angular Cli Ref: https://cli.angular.io/

    npm install -g @angular/cli
    
    0 讨论(0)
  • 2021-02-08 08:20

    No need to run npm update (I didn't want to update any packages) or delete the entire node_modules folder. I solved this by

    1. deleting package-lock.json
    2. deleting node_modules\material-design-icons-xxxxxxx
    3. running npm install again
    0 讨论(0)
提交回复
热议问题