Npm Error - No matching version found for

前端 未结 7 2103
灰色年华
灰色年华 2021-01-31 15:43

i clone a project with git, the project was create with ionic 2 but when i execute the command for re-create the node_modules folder i get this error.

npm instal         


        
7条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 16:19

    Removing package-lock.json should be the last resort, at least for projects that have reached production status. After having the same error as described in this question, I found that my package-lock.json was corrupt, even though it was generated. One of the packages had itself as an empty dependency, in this example jsdoc:

            "jsdoc": {
            "version": "x.y.z",
            . . . . . . 
            "dependencies": {
                . . . . . ,
                "jsdoc": {},
                "taffydb": {
                 . . . . . 
    

    Please note I have omitted irrelevant parts of the code in this example.

    I just removed the empty dependency "jsdoc": {}, and it was OK again.

提交回复
热议问题