Install Cordova plugin without package.json file on it

后端 未结 3 1304
情话喂你
情话喂你 2021-01-18 09:58

I\'m trying to install a Cordova Plugin with Cordova CLI 7.

This plugin does not have a package.json file on it, so it throws an error when adding it to my project.<

3条回答
  •  忘掉有多难
    2021-01-18 10:28

    --nofetch option is removed in Cordova 8.0.0: https://issues.apache.org/jira/browse/CB-13055

    If you have already installed Cordova 8.x.x then you can downgrade it to version 7.1.0 and then use the --nofetch option.

    Run the following command to downgrade Cordova to 7.1.0:

    npm install -g cordova@7.1.0
    

    If the above command doesn't work, then try uninstalling cordova at first and then install cordova version 7.1.0:

    npm uninstall -g cordova
    npm install -g cordova@7.1.0
    

    Then, check the Cordova version:

    cordova --version
    

提交回复
热议问题