question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
**(...):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 }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

5reactions
chorplercommented, Apr 30, 2020

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.

0reactions
stale[bot]commented, Nov 9, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm ERR! Could not install from as it does not contain a ...
Try this. First, remove node_modules and package-lock.json file rm -rf node_modules package-lock.json. Then, clean cache npm cache clean -- ...
Read more >
Local file dependencies in private module: Could not install ...
I am doing an npm install on @companyname/priv... ... module: Could not install from [...] as it does not contain a package.json file...
Read more >
depcheck - npm
The dependency lodash is used somewhere in the code, but not declared in the package.json file. Please note that, if a subfolder has...
Read more >
package.json - npm Docs
Description. This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just...
Read more >
Creating a package.json file - npm Docs
json file to your package to make it easy for others to manage and install. Packages published to the registry must contain a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found