Upgraded to angular 9.1 - error is Property 'supportsDOMEvents' - angular9

Here is the issue
error TS2416: Property 'supportsDOMEvents' in type 'ɵangular_packages_platform_browser_p
latform_browser_o' is not assignable to the same property in base type 'ɵDomAdapter'.

As #DrTeeth already mentioned, it's hard to help w/o any further infos.
But I've had a similar problem and want to share what had helped for me: This was a simple inconsistency of my dependencies. I', using a 3rd party Angular Component Library which was incompatible with the newer (Ivy-enabled) version, after I updated Angular itself. For me, the error message had some details about the package in question and after updating it, too, everything worked fine.

Related

go1.16 sigs.k8s.io/json sf.IsExported undefined error

When I build the Go project I get the following error
# sigs.k8s.io/json/internal/golang/encoding/json
../pkg/mod/sigs.k8s.io/json#v0.0.0-20211020170558-c049b76a60c6/internal/golang/encoding/json/encode.go:1249:12: sf.IsExported undefined (type reflect.StructField has no field or method IsExported)
../pkg/mod/sigs.k8s.io/json#v0.0.0-20211020170558-c049b76a60c6/internal/golang/encoding/json/encode.go:1255:18: sf.IsExported undefined (type reflect.StructField has no field or method IsExported)
I know this is a version problem, and it can be solved by upgrading the version to 1.17, but because the company's environment is 1.16, it cannot be upgraded because of this project
How can I modify it, if I lower the lower version, which version should I lower to?
I really appreciate any help with this.
Looks like this error could be coming from kubebuilder (or a tool derived from it such as operator-sdk). Then you should use the correct version of the given tool. E.g.,
kubebuilder - have a list mapping go versions to kubebuilder versions https://book.kubebuilder.io/quick-start.html#prerequisites
operator-sdk - don't have a list, but you can find it by going through the documentation for each version, e.g., the first I found that has a version lower than 1.17 is https://v1-16-x.sdk.operatorframework.io/docs/installation/#prerequisites-1

Migration issue Angular 8 to 9

I'm updating my angular project to use angular 9. In angular 8 I was using ng5-bootstrap-modal, but now I'm getting error:
ERROR in node_modules/ng5-bootstrap-modal/dist/bootstrap-modal.module.d.ts:4:22
error NG6002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class.
This likely means that the library (ng5-bootstrap-modal) which
declares BootstrapModalModule has not been processed correctly by
ngcc, or is not compatible with Angular Ivy. Check if a newer version
of the library is available, and update if so. Also consider checking
with the library's authors to see if the library is expected to be
compatible with Ivy.
Did anyone face the same issue?

lit-element : Uncaught (in promise) TypeError: Cannot read property 'previousSibling' of null

On migration to lit-element version 0.6.0. If I use
<script src="node_modules/#webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
in the header part of my document. I have the following error :
Uncaught (in promise) TypeError: Cannot read property 'previousSibling' of null
at NodePart._commitText (parts.ts:255)
at NodePart.commit (parts.ts:216)
at TemplateInstance.update (template-instance.ts:56)
at NodePart._commitTemplateResult (parts.ts:283)
at NodePart.commit (parts.ts:220)
at render (render.ts:48)
at Function.render (shady-render.ts:160)
at HTMLElement.update (lit-element.ts:44)
at HTMLElement._validate (updating-element.ts:600)
at HTMLElement._invalidate (updating-element.ts:574)
I couldn't trace where this error came from as the errors stack is huge and involves a lot of asynchronous calls. Also I tried to reproduce a minimal example, but same, I couldn't emulate the same error message.
The consequence of this error is a complete failure to load some custom elements (to the point the application is unusable).
Now If I change the header script with this one :
<script src="node_modules/#webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
The error just vanishes.. but now the following warning message appears in the console:
Incompatible ShadyCSS version detected. (shady-render.ts:42)
Please update to at least #webcomponents/webcomponentsjs#2.0.2 and#webcomponents/shadycss#1.3.1.
It's a funny message because my project is using webcomponentsjs version 2.1.2 and shadycss version 1.5.2 already.
Besides this warning message the css directives #apply are completely ignored resulting in an interface not using any flex properties (I let you imagine the mess).
Now this is a behavior I really can't understand even though I spent full afternoon digging into documentation and stuff. I summon your help.
There is a known issue with ShadyCSS that was introduced in 0.11.3, so that may be causing your problems with shady-render. I think the fix is already in so it should be resolved with 0.11.4
If you are using LitElement, you should probably be using lit-html version 0.11.2, which is what lit-element itself uses. Otherwise there's a reasonable chance that you are using two different versions, which may also explain some problems.
I can't reproduce your issues though: codepen.io/ruphin/pen/qMyMVO?editors=1010
The only explanation I can come up with is that webcomponents-bundle.js works, which triggers ShadyRender to be used, which breaks. When you switch to webcomponents-loader.js the polyfills don't work for some reason, which causes ShadyRender to not be used and explains why you don't get the error, but get the incompatible polyfill warnings, and don't get properly polyfilled CSS. I don't know why this is happening though, both versions of the polyfill should work, although I generally recommend using -bundle.
It would help if I knew on what browser/version you are seeing the problem.

parse4cn1 has some issue when working with Node JS and parse-server open source

The parse4cn1 library works well with parse.com but it has some issues when working with Node 4.3.2 and parse-server open source. For example, when calling the ParseUser.signup() function, the "Invalid key name" exception is always happened. I tried to debug and figure out that the ParseCommand object should add the ParseConstants.CONTENT_TYPE_JSON to its header in order to make it can work. I don't why because it still works without doing this with parse.com.
Another issue is the ParseQuery.find() is always failed when using the ParseQuery.whereContainedIn(). The server exception is "ParseException [code=102, msg=Improper encode of parameter, cause=null]". I guess this issue probably regarding the parameter has the json format in this case as well but I don't know to to resolve it. Any advice is appreciate. Sidiabale, do you have any advice? Thanks!
These problems are solved in version 3.0 of parse4cn1. Apparently, Parse Server is stricter with the need to specify the content-type header so code that previously worked with Parse.com does not work with Parse Server. I've addressed these issues in the aforementioned release. Try again with version 3.0 and let me know if you encounter any issues.

How to remove react-router 2.0 warning about props.history?

I have a question about ract-router 2.0 migration in my React app.
I removed every mixin and calls to this.props.history, like explained in the migration guide, but I still have warnings about it in the console :
Warning: [react-router] props.history and context.history are deprecated. Please use context.router
Actually, I found out in the debugger there is one warning for each nested component on the current page : RouterContext, App, and Posts
Any idea where it could come from ?
There's a bug with RC4 and the React DevTools that come from the dev tools attempting to inspect all the props and context. This will be fixed in the new RC.
You can disable this warning by going to /node_modules/react-router/lib/RouterUtils.js and commenting out lines 28-30.