The Angular Universal (SSR) cannot integrate with the external libraries like puppeteer, bulljs - angularjs

This is just for describing the issue and sharing my solution, I got stuck a lot of time on it.
This issue happened after I upgraded the Angular 10 -> 11 and changed the builder from udk:udk-runner to #angular-devkit
The issue I was facing is when I set the field bundleDependencies in angular.json to true . The Puppeteer cannot start with the error cannot launch the browser
Then I found it also happened on the other external libraries I'm using at the Server side like BullJS Bull-Board Puppeteer-Cluster with the below error
Github source for demo the issue: https://github.com/phattranky/angular-ssr-error-with-pupepteer

The solution is quite simple you just need to add externalDependencies below the field bundleDependencies, which are the libraries we are using.
"externalDependencies": ["puppeteer", "puppeteer-cluster", "bull", "bull-board"]
Sample:
What is the externalDependencies ?
https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/builders/server/schema.json
If you have the better solution and any feedbacks, please share for me. Thanks

Related

Permanently resolve Unable to watch for file changes in this large workspace

To resolve this issue I got there to the link provided by vscode
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
Ok, this, corrects the error, But when I restart the Linux and again open my React project,
I get the Same error.
max_user_watches file again gets the value of 8192 as no. of max files.
My react server is not starting due to this issue.
Then I again follow the same step of the link provided, this sometimes gets frustrating.
Any permanent Help I could get from you.
A workaround:
Just disable this built-in extension: TypeScript and JavaScript Language Features

Accordion component in AEM throwing error while building the project

Recently I was using the out of box accordion component in my AEM project (6.5). The component is working fine in author and publish mode. But when I'm trying to build the project using Maven, I'm getting the below error.
**${item.name in accordion.expandedItems}: extraneous input 'in' expecting {'}','.','&&','||','[','#'}**
There are no other detailed information regarding the error. What am I doing wrong here?
Thanks in advance.
You might reference an older version of HTL/Sightly in your pom.xml that has no support for in relational operator (which was added in version 1.4 of the spec).

Wakanda data browser (V1) in V 2.4.0

I've been using Wakanda since version 1. x and have been hesitating for a long time to test the newer versions because they no longer have a data browser. Now I have installed the latest version and installed a webfolder in the backend. Here I copied the complete WALIB directory and declared the Webfolder as active webfolder. Now I can use the URL "localhost: 8081/walib/dataBrowser/index. html" to access the Databrowser website, but 2 calls end with a 404 error:
"http://127.0.0.1:8081/db/walib/dataBrowser/index.package.json~waf-build.js?path=WALIB"
and
"http://127.0.0.1:8081/db/walib/dataBrowser/index.package.json~waf-build.css?path=WALIB"
It looks like the tilde is causing the problem.
How can I solve the problem, do I still have to make an adjustment somewhere?
#MyemaHMN has posted a solution that worked in this thread: Wakanda 2.2.1 Enterprise Server DataBrowser. Hope that helps.
The tilde does not seem to be the problem. In my solution I have the same call like:
http://127.0.0.1:8081/walib/dataBrowser/index.package.json~waf-build.css?path=WALIB
and it is working.
I guess it is the issue is the /db/ directory in the link. Where does it come from? The walib-directory is expected to be immediately under the webfolder.
Check the directory structure and check the app.waProject in relation to that.

React JSX error : Unclosed regular expression

Recently I was facing an issue coding React app on Visual Studio code. Because of this issue, whenever I wrote JSX inside the render function of the React Component and saved it, it would go messed up (I mean indentation would get messy). See the pic:
This error was also showing error like:
1. Unclosed regular expression
How to solve this?
If you are using jshint plugin, remove it and install ESLint plugin.
It is a good replacement for jshint in reactJS work.
I tried several options like creating a .eslintrc file or .jshintrc file.
But it turned out that in my Visual Studio Code IDE, there was third party extensions(eslint/jslint/tslint/beautify/jsformatter etc) that were causing a big mess in my JSX code.
I had to go to the extensions and disable all the extension which could hinder in the natural process of linting and code cleaning of React framework.
(These extensions are really great. But disabling them helped me in solving this issue of mine, no offense to anyone.)
If you are facing the same issue and the issue persists event after adding a .jshintrc with content:
{
"esversion": 6
}
then consider disabling the third party extensions.
Hope my answer helped.
the extension that did it for me was...
jshint
dbaeumer.jshint
Dirk Baeumer
as #abhay-shiro says, disabling a few extensions will usually resolve the issue.
I had the same problem, but it was "beautify" extension which was causing the error, I uninstalled it and installed prettier. It fixed the problem.
I solved this issue by disabling show syntax errors checkbox in visual studio 2015.
Tools -> options - > text editor -> javascript -> intelliSense -> general -> show syntax errors(disable)

sublime text 3 js code completion not working after installing angularJS

I just installed angularJS package control after following the link http://weblogs.asp.net/dwahlin/using-the-angularjs-package-for-sublime-text, this enabled me to get the angular code hints but it messed up my default code hinting feature in sublime-text 3. In the attached image, I have this function decrementCountdown defined, when I try to use it - it does not show up in the code completion hints, the only things I see is the AngularJS methods.
Could someone please help me? thanks
Try disabling AngularJS javascript Autocompletion
as can be seen in the issue on their Github Page.
Sublime 3 javascript Autocompletion not working properly

Resources