Cordova-plugin-background-geolocation: npm ERR! Could not install from "@mauron85/cordova-plugin-background-geolocation@~3.0.7" as it does not contain a package.json file.

Created on 12 Dec 2019  路  9Comments  路  Source: mauron85/cordova-plugin-background-geolocation

**(...):cordova$ cordova platform rm ios**
Removing platform ios from config.xml file...
{ Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "@mauron85/cordova-plugin-background-geolocation@~3.0.7" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/razbuchnik/.npm/_logs/2019-12-12T08_33_58_733Z-debug.log
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:189:13)
    at Pipe._handle.close (net.js:600:12)
  stderr:
   'npm ERR! code ENOLOCAL\nnpm ERR! Could not install from "@mauron85/cordova-plugin-background-geolocation@~3.0.7" as it does not contain a package.json file.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR!     /Users/razbuchnik/.npm/_logs/2019-12-12T08_33_58_733Z-debug.log\n',
  code: 1 }
stale

Most helpful comment

I don't know if this will help anyone else, but I was getting this error earlier tonight and discovered that at some point, I ran a cordova plugin add command that created an erroneous entry in my package.json file. Under dependencies it had the following entry:

  "cordova-plugin-background-geolocation": "@mauron85/cordova-plugin-background-geolocation@^3.1.0"

When it should have only had:

    "@mauron85/cordova-plugin-background-geolocation": "^3.1.0",

Really not sure how I did that, but removing that line with the broken version field fixed it.

All 9 comments

I'm facing same issue. Any updates?

No updates yet

I am also facing the same issue.

any update? same issue with 3.1.0 version

Any update? Same issue.

Same issue....

I don't know if this will help anyone else, but I was getting this error earlier tonight and discovered that at some point, I ran a cordova plugin add command that created an erroneous entry in my package.json file. Under dependencies it had the following entry:

  "cordova-plugin-background-geolocation": "@mauron85/cordova-plugin-background-geolocation@^3.1.0"

When it should have only had:

    "@mauron85/cordova-plugin-background-geolocation": "^3.1.0",

Really not sure how I did that, but removing that line with the broken version field fixed it.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ritzlgrmft picture Ritzlgrmft  路  6Comments

n0minal picture n0minal  路  10Comments

adrieldubemarante picture adrieldubemarante  路  4Comments

maurojones picture maurojones  路  3Comments

mahmed-ntd picture mahmed-ntd  路  10Comments