livesemantics commented on PR #107: URL: https://github.com/apache/cordova-plugin-screen-orientation/pull/107#issuecomment-1353429823
> > Great job guys! How do I install this fix if it's not published to npm (I'm using Capacitor 4.6)? I tried to npm install directly from github but keep getting error messages (-4058). maybe I'm doing it wrong... > > I'm not familiar with Capacitor, but `npm install` is usually not enough, it simply installs the package into node_modules, but Cordova doesn't know about it and doesn't actually installs it into your platforms. > > With the Cordova CLI, you'd use the git url with `cordova plugin add` like so: > > ``` > cordova plugin remove cordova-plugin-screen-orientation > cordova plugin add https://github.com/apache/cordova-plugin-screen-orientation.git > ``` > > The first command will remove the existing plugin install so that you can reinstall the newer version. Note that installing from git are unreleased versions not suitable for production. > > I'm not sure how Capacitor exposes these CLI actions, so you may have to resort to their documentation. Capacitor is not that much different. You simply run `npm install` and then `npx cap synch`. The problem is that I get an error when I run npm install directly from github. I've tried: `npm install https://github.com/apache/cordova-plugin-screen-orientation.git ` (as well as other variations) and I keep getting an errors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
