Unable to find a suitable version for polymer - bower

I'm installing and configuring Polymer and i get to this:
Unable to find a suitable version for polymer, please choose one:
1) polymer#master which resolved to ced408df76 and is required by core-component-page#a431519835, highlightjs-element#a2c5fc08d0, marked-element#761922b4a2
2) polymer#0.2.4 which resolved to 0.2.4 and is required by core-ajax#0.2.4, core-bind#0.2.4, core-collapse#0.2.4, core-doc-viewer#0.2.4, core-elements#0.2.4, core-firebase#0.2.4, core-icon#0.2.4, core-icons#0.2.4, core-iconset#0.2.4, core-iconset-svg#0.2.4, core-input#0.2.4, core-layout#0.2.4, core-layout-grid#0.2.4, core-layout-trbl#0.2.4, core-list#0.2.4, core-localstorage#0.2.4, core-media-query#0.2.4, core-menu-button#0.2.4, core-meta#0.2.4, core-overlay#0.2.4, core-range#0.2.4, core-selection#0.2.4, core-selector#0.2.4, core-theme-aware#0.2.4, core-tooltip#0.2.4, core-transition#0.2.4
3) polymer#~0.2.4 which resolved to 0.2.4 and is required by project
Prefix the choice with ! to persist it to bower.json
I'm still learning about and i dont know which one i should choose and why this problem happend. Can anyone explain me this tree options?
Thanks..

The recommended way to install Polymer 0.2.4 is through Bower. We’ve
chosen Bower because it removes the hassle of dependency management
when developing or consuming elements.
from http://www.polymer-project.org/docs/start/getting-the-code.html
I'd go with
2) polymer#0.2.4 which resolved to 0.2.4 and is required by
...
This happened because when bower went to install a version of polymer it was presented with three options and didnt know which one to choose from. Many packages have a stable release and a development version, which you want is up to yourself. You can usually check up the packages on github or there websites to find which package might suit you best

Related

I have a Swift Package and I want to know how to get the current version of this package

Similar to how you get your apps version kCFBundleVersionKey how does one get the version of the package you are working in?
I don't think it's possible at the moment to get the value easily.
You can either read the Package.resolved file or you can set up a public constant where you would define the version of your library.
public let version = "0.0.1"
import MyLibrary
print(MyLibrary.version)
There isn't a standard way how to do this, every package could have a different constant (or not have it at all)
You can check package version rules in project package dependencies tab. Check screenshot below. Propably it would be sufficient for most use cases.
Edit: The context has changed, the question was to get the version of MyPackage I'm working on via code. There isn't any documented or recommended method as of now. Though this can be achieved by a hack through reading the Package.resolved file as mentioned by Malcolm.
I'm not deleting this answer for any future users who are looking for answer on how to get the exact latest version of a Package.
You can give the same major version number and give Update to latest package version option on Xcode. eg: If current version is 2.4.5 you just need to provide 2.0.0 and update. There is also an option to provide the exact version of swift package you need.

How to resolve conflicts in `project.pbxproj` file while upgrading react native?

I am using Xcode 9.4 and current react native version #0.54.4 I want to upgrade the version to 0.55.4.
As I upgrade my project using react-native-git-upgrade, I see some un merged conflicts in the project.pbxproj. Some of the settings are my own that are conflicting with the changes in the new version.
I tried all the possible ways in which I could resolve the conflicts. But still X-code shows the error could not load the project, and it does not allow me to build my project.
How do I understand what those conflicts are referring to and how can I safely resolve the conflicts?
Unfortunately there is no magic way to resolve conflicts. I wish there was. The file is managed by Xcode and from personal experience I have found that you can easily mess it up performing merges.
Git is definitely your best-friend. Make sure that before you start any merge you are on a new branch and fully committed so that if you mess-up you can easily get back to your original version.
What I usually do is keep the original version of the project.pbxproj and then make the changes manually in Xcode. I know this doesn't sound ideal but it does mean you should be able to open the project in Xcode, though your project may not run - just yet.
If you’re unclear about which version to keep, I would keep ours as that is the original version of your project.pbxproj. From the documentation:
You can think of "ours" as "your team" and "theirs" as "the React Native dev team".
Then I would make the changes manually as detailed below. As that will show their changes and the should hopefully not be that many.
To help me find the changes that I have to make I find that React Native Upgrade Helper is an invaluable resource. There you can find a git diff of any two versions of react-native that you choose. (This saves you having to create two projects and then compare them yourself, a big timesaver.)
Currently you are upgrading from 0.54.4 to 0.55.4 this link shows the diff between those versions
https://react-native-community.github.io/upgrade-helper/?from=0.54.4&to=0.55.4
For additional help you could create a project in a specific react-native version, using the following will create a project for version 0.55.4.
react-native init newproject --version react-native#0.55.4
That way you can look inside the Xcode project to see what has been added, and where it was added from, as the git diff doesn't always tell where it came from.
I have never had much luck using react-native-git-upgrade and I have come to prefer doing it manually, as I have had much more success doing it that way.
After updating react native to version 0.55 from 0.51, everything seemed to function normally in the local mode. But the production build fails.
I fixed this by upgrading react native once again from 0.51, and keeping my changes instead of theirs almost all the time.
May be there should be more detailed explanation in the documentation regarding the kind of issues one run into, by picking the wrong changes.

grails - how can you force update a sub-dependency

Due to a security issue with org.codehaus.groovy:groovy-all i need to update it within a grails project. the issue is that it is being used by org.grails:grails-bootstrap and i am unable to update that, because it is never explicitly imported in my buildconfig.groovy file.
grails-bootstrap is currently importing org.codehaus.groovy:groovy-all:2.3.6 and i need it to use org.codehaus.groovy:groovy-all:2.4.13
is there any way to update only the sub-dependency? is there any way to force a new version of org.grails:grails-bootstrap.
any help would be appreciated.
edit: i am on grails version 2.4.3 and dont want to make the upgrade to 3.x.x
You can add an explicit dependency in BuildConfig.groovy.

Nativescript with AppBuilder plugin update

I am developing an app using nativescript with AppBuilder and Visual Studio. I am using a plugin called nativescript-pdf-view (https://github.com/Merott/nativescript-pdf-view). Everything worked fine until Apple changed one of their methods in xCode 8. See http://fluentreports.com/blog/?p=401 for details.
I have submitted a question to the author of the plugin 5 days ago, but have not received an answer yet, so I decided to make the change in the plugin code myself. The change is very simple, but after the update when I load the app to my test device, I still get the same error.
My question is: How does AppBuilder build plugins? Is it enough to update source code of the plugin to update it? How can I force the AppBuilder to rebuild this plugin?
I have a feeling the the plugin is cached somewhere because I get the same error message and stack trace even though the source code is changed.
Any suggestions are greatly appreciated.
In order to use a custom plugin in your project you have to update the reference in your package.json. For example in your case, you can:
Get the source code of nativescript-pdf-view.
Fix the issue you've noticed.
Build a .tgz from your modified source code (npm pack command should help you to create a .tgz).
Include the .tgz in your project (for example at the root level, right next to package.json).
Reference the .tgz in your package.json, so instead of having "nativescript-pdf-view": "1.0.0", you should have "nativescript-pdf-view": "file:nativescrip-pdf-view.tgz".
Build your project.
This way the custom plugin will be used instead of the one from npm.
There's no caching of plugins in the cloud builds. The process uses your package.json to install required dependencies.

dart polymer and hangouts_api incompatible versions

I am trying to use dart hangouts_api and polymer at the same time and I get the following error:
Incompatible version constraints on browser:
- hangouts_api 0.3.0 depends on version >=0.9.0 <0.10.0
- polymer 0.15.1 depends on version >=0.10.0 <0.11.0
Mu pubspec.yaml file refers to the current version of each.
I cannot use anything but the lastest version of each as the suggested alternatives are years old. Is there a work around? To whom should I report this to (assuming it is a bug)?
Just create an issue in the hangouts_api GitHub repo and ask to bring dependencies up to date or even better, create a pull request.
As a workaround you can force a specific version by adding
dependency_overrides:
browser:">=0.10.0“
see also https://www.dartlang.org/tools/pub/dependencies.html#dependency-overrides

Resources