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.

Failed to install because no package.json

See original GitHub issue

Hi everyone, I am facing an issue on WIndows 10. WHen I’m adding the plugin to the project, all works fine. The plugin installs well and works well when compiled. But when I try to freshly npm install my project, I get this message : Could not install from "@mauron85/cordova-plugin-background-geolocation@~3.0.3" as it does not contain a package.json

The same error occur when executing cordova platform rm/add.

Thanks in advance for your help.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
HarelMcommented, Jun 22, 2019

I had the same issue. I also thought it was a glitch and reported it here: #596 But clearly it doesn’t happen only to me, and I could reproduce it on another machine now. The solution it to remove the "cordova-plugin-mauron85-background-geolocation": "@mauron85/cordova-plugin-background-geolocation@~3.0.3", entry from the dependencies section (the entire line) of `package.json. This is added after you add a platform. @mauron85 Can you take a look at this? I think it has to do with the fact that the name of the cordova plugin and the name in npm are not the same, or it has to do with the name change as it didn’t happen before the rename.

0reactions
stale[bot]commented, Jan 7, 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 install gives error "can't find a package.json file"
You don't say what module you want to install - hence npm looks for a file package.json ... so there's nothing to install,...
Read more >
How to fix the npm can't find package.json error - Reactgo
To fix this error, first you need to initialize the package.json by using the following command. npm init -y. Now, you can install...
Read more >
Local file dependencies in private module: Could not install ...
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand.
Read more >
Fix for error package.json not found in npm install running
Usually, this error comes when npm commands are running and not found package.json in the application root. This error gives after running the...
Read more >
NPM install error - Material Design for Bootstrap
Hi! You can try to: 1. Delete your node_modules catalog and package-lock.json file 2. Run npm cache clean ...
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