PolarCape / polarcape-cordova-plugin-document-handler

Polar Cape Cordova Plugin Document Handler
MIT License
10 stars 19 forks source link

Unable to install Plugin #14

Open PradeepYadav123 opened 6 years ago

PradeepYadav123 commented 6 years ago

screenshot 172

Hi i am unable to add plugin getting warning as in attached document file. +-- UNMET PEER DEPENDENCY cordova-plugin-file@^3.0.0 `-- polarcape-cordova-plugin-document-handler@1.0.6

npm WARN polarcape-cordova-plugin-document-handler@1.0.6 requires a peer of cordova-plugin-file@^3.0.0 but none was installed.

Kindly do the needful to help me

Thanks

vkajtazov commented 6 years ago

@PradeepYadav123 Try to install plugin via cordova plugin add polarcape-cordova-plugin-document-handler

PradeepYadav123 commented 6 years ago

I am able to install the Plugin via cordova plugin add polarcape-cordova-plugin-document-handler but its not working getting compile time error. My Cordova version 7.01 Node Version v6.10.3 Android platform version 6.1.2

Request you to help me to solve the issue i m facing.

Thanks Alot

PradeepYadav123 commented 6 years ago

I am not able to install the Plugin via cordova plugin add polarcape-cordova-plugin-document-handler and npm install polarcape-cordova-plugin-document-handler also My Cordova version 7.01 Node Version v6.10.3 Android platform version 6.1.2 npn version 5.0.3

screenshot 175

Request you to help me to solve the issue i m facing.

Thanks Alot

vkajtazov commented 6 years ago

@PradeepYadav123 Please try to downgrade your cordova while we fix the plugin.

vkajtazov commented 6 years ago

@PradeepYadav123 Meanwhile we fixed the problem, please check the latest version.

PradeepYadav123 commented 6 years ago

I am still facing same issue. But am thankful to you for your quick reply. Can you help howto overcome from this issue.

screenshot 176

Thanks alot

vkajtazov commented 6 years ago

@PradeepYadav123 We tested the plugin with latest cordova, and npm and we did not encountered any problem. We are suggesting you to try install the plugin on clean cordova project just to be sure that our plugin is compatible with your cordova and npm versions.

PradeepYadav123 commented 6 years ago

Sorry for disturbing you again but i am unable to install plugin

I am putting log file below :--

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Users\Pradeep\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install', 1 verbose cli 'polarcape-cordova-plugin-document-handler', 1 verbose cli '--save' ] 2 info using npm@5.0.3 3 info using node@v6.10.3 4 verbose npm-session ebfc003a4adf78b6 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 silly fetchPackageMetaData error for polarcape-cordova-plugin-document-handler@file:node_modules\polarcape-cordova-plugin-document-handler Could not install from "node_modules\polarcape-cordova-plugin-document-handler" as it does not contain a package.json file. 8 verbose stack Error: ENOENT: no such file or directory, open 'E:\Capacitate\node_modules\node_modules\polarcape-cordova-plugin-document-handler\package.json' 8 verbose stack at Error (native) 9 verbose cwd E:\Capacitate\node_modules 10 verbose Windows_NT 10.0.14393 11 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Pradeep\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "polarcape-cordova-plugin-document-handler" "--save" 12 verbose node v6.10.3 13 verbose npm v5.0.3 14 error code ENOLOCAL 15 error Could not install from "node_modules\polarcape-cordova-plugin-document-handler" as it does not contain a package.json file. 16 verbose exit [ 1, true ]

Can u guide what am i lacking here to acheive :--- Assistance would be highly appreciated .

Thanks alot screenshot 177 screenshot 178

PradeepYadav123 commented 6 years ago

Hi, I installed fresh Cordova and rempved npm and cache the I tried again to install the plugin but could not succeeded. Geeting below as message :-

E:\Test>npm install -g polarcape-cordova-plugin-document-handler npm WARN polarcape-cordova-plugin-document-handler@1.0.9 requires a peer of cordova-plugin-file@^4.0.0 but none was installed.

E:\Test>npm install polarcape-cordova-plugin-document-handler --save-dev npm WARN com.tcs.capacitate@1.0.0 No repository field.

E:\Test>cordova plugin add polarcape-cordova-plugin-document-handler Error: Failed to fetch plugin polarcape-cordova-plugin-document-handler via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module

E:\Test> screenshot 179

Request you to please do the needful.

vkajtazov commented 6 years ago

In the README file there are listed 3 commands for installing the plugin. You have to choose one of them. I prefer using this one. cordova plugin add polarcape-cordova-plugin-document-handler

Maybe the problem is with your cordova-file-plugin because it is dependent to this plugin. Check which version of cordova-file-plugin you have and make sure that it is at least 4.0.0.

PradeepYadav123 commented 6 years ago

I have cordova-file-plugin version 4.3.3 which is higher than 4.0.0

For your reference i am attaching screenshot.

E:\Test>cordova plugin add polarcape-cordova-plugin-document-handler Error: Failed to fetch plugin polarcape-cordova-plugin-document-handler via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Error: cmd: Command failed with exit code 1 Error output: npm ERR! code ENOLOCAL npm ERR! Could not install from "node_modules\polarcape-cordova-plugin-document-handler" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Pradeep\AppData\Roaming\npm-cache_logs\2017-06-10T01_53_04_976Z-debug.log screenshot 180

vaskgjuri commented 6 years ago

Hi,

Can you try and remove node_modules directory or/and recreate the cordova project from scratch? Because I tried to do a clean install on a new project and everything works fine:

C:\workspace\bitbucket>cordova create test-plugin com.test.plugin Creating a new cordova project.

C:\workspace\bitbucket>cd test-plugin

C:\workspace\bitbucket\test-plugin>cordova platform add android Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.test.plugin Name: HelloCordova Activity: MainActivity Android target: android-25 Subproject Path: CordovaLib Android project created with cordova-android@6.1.2 Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project Fetching plugin "cordova-plugin-whitelist@1" via npm Installing "cordova-plugin-whitelist" for android

           This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

C:\workspace\bitbucket\test-plugin>cordova plugin add polarcape-cordova-plugin-document-handler Fetching plugin "polarcape-cordova-plugin-document-handler" via npm Installing "polarcape-cordova-plugin-document-handler" for android Fetching plugin "cordova-plugin-file" via npm Installing "cordova-plugin-file" for android Fetching plugin "cordova-plugin-compat" via npm Installing "cordova-plugin-compat" for android

The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

  "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.

Subproject Path: CordovaLib

C:\workspace\bitbucket\test-plugin>

Looks quite good to me. Try the same commands I have above and see if it works. If it dies, then it is something wrong with your configuration. The plugin looks just fine.

BR

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: PradeepYadav123mailto:notifications@github.com Sent: сабота, 10 јуни 2017 03:57 To: PolarCape/polarcape-cordova-plugin-document-handlermailto:polarcape-cordova-plugin-document-handler@noreply.github.com Cc: Subscribedmailto:subscribed@noreply.github.com Subject: Re: [PolarCape/polarcape-cordova-plugin-document-handler] Unable to install Plugin (#14)

I have cordova-file-plugin version 4.3.3 which is higher than 4.0.0

For your reference i am attaching screenshot.

E:\Test>cordova plugin add polarcape-cordova-plugin-document-handler Error: Failed to fetch plugin polarcape-cordova-plugin-document-handler via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Error: cmd: Command failed with exit code 1 Error output: npm ERR! code ENOLOCAL npm ERR! Could not install from "node_modules\polarcape-cordova-plugin-document-handler" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Pradeep\AppData\Roaming\npm-cache_logs\2017-06-10T01_53_04_976Z-debug.log [screenshot 180]https://user-images.githubusercontent.com/16350087/26999046-4255a2b8-4dae-11e7-97ab-1558e6b6bc91.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/PolarCape/polarcape-cordova-plugin-document-handler/issues/14#issuecomment-307534802, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGGmXM568SpLL4Gkgi41mUHBjCoRTJVSks5sCfgYgaJpZM4Nmu_4.

PradeepYadav123 commented 6 years ago

Hi vaskgjuri,

Thanks now i have installed plugin successfully by your updated guidelines. But when i run application getting as "unfortunately app has stopped" error. while i remove the plugin and run app in device it runs successfully.

Request you to please help me to overcome from this issue.

Thanks a lot Pradeep Yadav