Upgrade to Angular9 , Node module is not detecting in component spec - angular9

My spec file is not detecting Node modules after Angular 9 upgrade

Related

Dart Angular and mySql

I'm starting to build a new version of web application migrating to a very old php+html code to Angular Dart. I use Dart for daily work so I'm familiar with it, while I'm not familiar to Angular.
The old school website used mySql as DB to store data, so I would love to avoid a complete migration to a new DB if possible, but I'm facing a problem.
mysql1 I guess is incompatible with Angular, since when compile I get this error:
[WARNING] build_web_compilers:entrypoint on web/main.dart: Skipping compiling WHLivePortal|web/main.dart with ddc because some of its
transitive libraries have sdk dependencies that not supported on this platform:
mysql1|lib/src/buffered_socket.dart
mysql1|lib/src/buffer.dart
mysql1|lib/src/single_connection.dart
SQLJocky is incompatible with dart 2
Which path can I follow to step forward?

Robotframework: Create Webdriver reports bluetooth_adapter_winrt.cc error

We have developed some tests using a Robotframework Ride 1.7.4 / Python 2.7 environment, and tests are running correctly.
We have now created a new environment using Robotframework ride v2.0b1 / Python 3.8.4 and the following commands are no longer working as expected.
Both environments use robotframework 3.2.1
${options}= Create Dictionary binary=C:/path_to_application/application_name.exe
${caps}= Create Dictionary chromeOptions=${options}
Create Webdriver Chrome desired_capabilities=${caps}
[Arguments] ${url}
${options}= Create Dictionary androidPackage=com.android.chrome
${caps}= Create Dictionary chromeOptions=${options}
Create Webdriver Chrome desired_capabilities=${caps}
We are trying to test "applications" using robotframework .
Instead of starting application_name.exe (in the case of windows app ) or an emulated android client (in the case of android package) we get a chrome browser appearing (for error message see below)
Partial list of libraries we have installed (new environment)
robotframework 3.2.1
robotframework-appiumlibrary 1.5.0.6
robotframework-archivelibrary 0.4.0
robotframework-autoitlibrary 1.2.5
robotframework-difflibrary 0.1.0
robotframework-eyes 1.3.3
robotframework-lint 1.1
robotframework-pabot 1.8.0
robotframework-ride 2.0b1
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 4.4.0
robotframeworklexer 1.1
robotremoteserver 1.1
selenium 3.141.0
setuptools 41.2.0
six 1.15.0
soupsieve 2.0.1
tqdm 4.47.0
urllib3 1.25.9
webdriver-manager 3.2.1
webdrivermanager 0.8.0
Werkzeug 1.0.1
wheel 0.34.2
wxPython 4.0.7.post2
chromedriver.exe is the latest version (for Chrome 84)
I have tried using older versions of chromedriver, but this has not fixed the problem.
Libraries used in the "working" environment
robotframework 3.2.1
robotframework-archivelibrary 0.4.0
robotframework-databaselibrary 1.2
robotframework-difflibrary 0.1.0
robotframework-eyes 0.64
robotframework-lint 0.9
robotframework-pabot 0.44
robotframework-ride 1.7.4.2
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 4.4.0
robotframeworklexer 1.1
robotremoteserver 1.1
selenium 3.141.0
setuptools 20.10.1
six 1.12.0
urllib3 1.25.10
Werkzeug 0.15.0
wxPython 4.0.4
Thanks
Gwyn
I have simplified things, and just run a few lines of .robot code from the command line robot test.robot (test.robot contains above lines and selenium library reference)
The new environment shows the following error
DevTools listening on ws://127.0.0.1:56934/devtools/browser/426cb694-b5e1-4cc7-ad64-1f47db368449
.[10456:14676:0723/141008.354:ERROR:device_event_log_impl.cc(208)] [14:10:08.358] Bluetooth: bluetooth_adapter_winrt.cc:1074 Getting Default Adapter failed.
Launch Windows NativeApp | FAIL |
Element 'logo' did not appear in 15 seconds.
Original question was mixing up version of Robot Framework IDE (RIDE), with what it seemed to be the version of the framework itself.
The problem you want to solve, is that a Robot Framework test suite script was working in a Python 2.7 configuration, and now it does not, in a Python 3.8 configuration.
You need to make sure, your configuration in Python 2.7 is still working, and take note of the versions of libraries installed there. Then do the same but on Python 3.8 (you already shown those).
This confirmation is independent of the IDE or Editor you use to edit the test suite script. Just focus on running it from the command window/prompt/terminal/shell.
RIDE 1.7.4.2 can be used to run Robot Framework installed either in Python 2.7 or 3.8.
The same happens with RIDE 2.0b1 installed on Python 3.8, it can run Robot Framework installed either in Python 2.7 or 3.8. It all depends on what Robot Framework installation is found first in the PATH environment variable. Or on other words, the actual robot when you open a command window/prompt/terminal/shell and issue the command, for example: robot --version.
Other thing you mention is Appium not working with the style of command you used. The option binary is meant to pass to Webdriver the path of chromedriver or other webdriver like, for example operadriver. I never saw that use to start an mobile phone App.
Looks like chromedriver, just ignored the binary option (because it does not need it).
Resolved by ensuring we only had chromedriver v37 in our path in the "new" environment.
Later versions of Chromedriver (I tried v79, and v84) don't work.

'Use of const in strict mode': How can `node_modules/[sub_folder]` can compile to ES5 and not ES6?

Config from ionic info:
Cordova CLI: 8.0.0
Ionic Framework Version: 3.9.2
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 3.2.0
Node Version: v6.14.4
Working on some update on an Ionic 2 project previously running on an Android 4.4 device.
I ran in an error similar to this one: Ionic2 White screen error on deploy Android 4.2.2: Use of const in strict mode
After research I found that under my project in [project]/android/app/src/main/www/assets/build/vendor.js I have some const used to define variables in the file.
Variables marked with const seem to be all linked to directory node_module/gsap (this library).
My understanding is that gsap generate in ES6 format instead of ES5 format in the vendor.js file.
The GSAP version is 1.20.6.
Internet reading made me understood that through webpack or babel I could control that it generates in ES5 format.
But I don't understand how to do that in [project]/tsconfig.json file where it is stated:
{
"compilerOptions": {
...
"target": "es5",
...
}
"exclude": ["node_modules"],
...
}
Do you have an idea how to force ES5 in a defined sub node_modules directory like node_modules/gsap
Downgrading to gsap~1.19.1 helped to do a workaround to this problem.

How do I build a Polymer 2.x project with Polymer CLI?

Can anyone point me to a tutorial that uses Polymer 2 and polymer-build from Polymer CLI? When I use any example in the polymer-starter-kit and use polymer serve, it works fine; but when I use polymer build and serve the bundled or unbundled directory, I get 404 errors. I have even updated to the newest alpha version of polymer-cli.
Also, using https://github.com/tony19/generator-polymer-init-2-x-app generators have the same problem.
I also spent quit a bit of time to figure this one out. Please use the polymer-cli#next instead of polymer-cli
Plain polymer-cli doesn't seem to have the latest build and optimizations to support Polymer 2.0#Preview related functionality.
You can install polymer-cli#next. In Ubuntu, you can simply use npm install -g polymer-cli#next
Then on, the bundled and unbundled versions of the application generated through polymer build would just works fine.
Edit:
You can find my sample Polymer2.0#Preview version of the code at https://github.com/phani1kumar/phani1kumar.github.io branch is "devmaster".
the sw-precache-config.js is initial render-blocking. This will load all the resources that the main page needs to make the app available for offline use. src/lazy-resources.html loads resources for the next routes.
You would need to get a proper configuration based on your layout and main page in the following 3 files:
sw-precache-config.js, polymer.json, src/lazy-resources.html. This is a practice followed in the shop app from Polymer team, you may opt to a different mechanism for lazy loading. The bottom-line for lazy loading is to load the resources after Polymer.RenderStatus.afterNextRender.
You may also find the following article interesting: https://medium.com/#marcushellberg/how-i-sped-up-the-initial-render-of-my-polymer-app-by-86-eeff648a3dc0#.pi2iucwzi
I noticed a bug in the generator in that the starter-kit subgenerator was missing a dependency on webcomponentsjs, which would cause an error with polymer-build. And as you discovered, polymer.json was also missing dependencies for the polyfill support of webcomponentsjs, which caused 404s on polyfilled browsers (such as Linux Chrome). That's all fixed now in v0.0.6.
You'll also need a version of polymer-build that does not try to uglify the JavaScript, which would fail due to its inability to recognize ES6. The new-build-flags branch of the polymer-cli repo replaces uglify with babili for ES6 minification (added in PR#525). You could check out that branch and build it yourself, or you could install it from here:
npm i -g tony19-contrib/polymer-cli#dist-new-build-flags
For convenience, this branch is added as a devDependency when generating the 2.0 starter kit with generator-polymer-init-2-x-app.
To build and serve a Polymer 2.0 Starter Kit project:
Generate a 2.0 Starter Kit (using generator-polymer-init-2-x-app, v0.0.6 or newer) by selecting 2-x-app - starter application template:
$ polymer init
? Which starter template would you like to use?
...
2-x-app - (2.0 preview) blank application template
2-x-app - (2.0 preview) blank element template
❯ 2-x-app - (2.0 preview) starter application template
After the project generator finishes, build the project with yarn build:
$ yarn build
info: Deleting build/ directory...
info: Generating build/ directory...
info: Build complete!
Note that the output is only build/, and no longer build/bundled/ and build/unbundled/.
Serve up the contents of the build directory, and automatically open a browser to it:
$ polymer serve build -o
You could also serve it with a different tool to verify that the build output would work outside of the context of any Polymer tools. Start a Python server in build/, and manually open a browser to it:
$ cd build
$ python -m SimpleHTTPServer

Cant use NuGet to add Unity IoC to a portable class library

I am making a Windows Phone 8 application, however because I would like at some point to also publish this application for Windows 8.1 store I made the effort to factor out the application logic into a portable class library. All good so far.
Now being a good boy I want to use an IoC container, unity by preference (since I am familiar with it in desktop and Win Phone 8 only apps)
So here's my problem; the NuGet Unity package will not install into my portable application with this result:
Installing 'Unity 3.0.1304.1'.
Successfully installed 'Unity 3.0.1304.1'.
Adding 'Unity 3.0.1304.1' to Logic.
Uninstalling 'Unity 3.0.1304.1'.
Successfully uninstalled 'Unity 3.0.1304.1'.
Install failed. Rolling back...
Could not install package 'Unity 3.0.1304.1'. You are trying to install this package into a
project that targets 'portable-net45+wp80+win', but the package does not contain any assembly
references or content files that are compatible with that framework. For more information,
contact the package author.
So is there a unity that works with a PCL? or is this just a shortcoming of the NuGet package?
I failed to find any useful documentation on the P&P website to indicate what platforms it is compatible with, but I know it does support WP8 at the least since the NuGet package is quite happy with libraries targeting just that.
Any guidance from the community would be very welcome here I don't want to abandon using a PCL for my app logic if I can avoid it, but if it comes down to a toss up between that and NuGet for package management I will in order to keep the NuGet goodness.
Could this be related to NuGet and Portable Class Libraries - Package doesn't target any framework? that seems more related to making your own NuGet packages for use in your own PCLs.
Unity 3.0.1304.1 does not contain any PCL assemblies so you will not be able to install it into a PCL project using NuGet.
The Unity NuGet package contains assemblies that target the following frameworks:
.NETFramework 4.5
.NETCore 4.5 (Windows Store/WinRT)
Windows Phone 8
You can see these target frameworks if you open the NuGet package into NuGet Package Explorer or download the NuGet package and open it using a program that supports zip files such as 7zip or Windows built-in zip file support.
So your possible options are:
Just use Unity in your main Windows Phone 8 application.
Write your own IOC container.
Use an IOC container that supports PCL projects such as Portable.CommonServiceLocator.
Compile your own PCL version of Unity.
Use a later version of Unity 3.5 since this includes a PCL assembly targeting portable-net45+wp80+win8+MonoAndroid10+MonoTouch10
Updated: 2014-05-11
Unity 3.5 now includes a PCL assembly that targets portable-net45+wp80+win8+MonoAndroid10+MonoTouch10 which will install into a project that targets portable-net45+wp80+win.
There is no Unity for PCL, but you can use Ninject for example.