Failed to install because no package.json
See original GitHub issueHi 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:
- Created 4 years ago
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 thedependencies
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.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.