Angular generated project is failing default tests [duplicate] - node.js

After upgrading to Angular version 11, unit tests now fail on Travis CI. Locally they do succeed (even after clean install with the same node, nvm and npm versions).
The error for all unit tests is the same -
Failed: fn.bind is not a function
TypeError: fn.bind is not a function
at newTrustedFunctionForJIT (node_modules/#angular/compiler/fesm2015/compiler.js:6845:1)
at JitEvaluator.evaluateCode (node_modules/#angular/compiler/fesm2015/compiler.js:6909:1)
at JitEvaluator.evaluateStatements (node_modules/#angular/compiler/fesm2015/compiler.js:6883:1)
Based on the error message, I would assume that the issue might be related to ngcc? Anyone had similar issue?

Today I had the same problem. It involved testing with ChromeHeadless.
I had old version of Chrome Headless 83.0.4103.97 installed in docker image. After updating it to latest version 88.0.4324.96 it started to work.

Additional here is the corresponding angular github issue.
Using Chrome >= 87 should fix the issue.

Related

NodeJS not recognized under Windows 10

I am using the LTS version of NodeJS. The problem started with version node-v16.18.0-x64 and did continue with node-v18.12.0-x64.
What I am doing:
Developing Playwright test. I ran the test and NodeJS was working. After one minute, I rerun the test and NodeJS is no longer recognized in my OS.
The issue appears when I am using Cypress, so I think the issue is not related to the technology that I am using.
I checked the environment variable: It is there.
The workaround I am doing is to uninstall the NodeJS from the control panel and install it again. There is an option to repair the NodeJS installation. But when I try to use it, I receive an error message that the NodeJS is not installed on this OS.

Cypress Cucumber

Can some let me know how to integrate cucumber in cypress 10 and above version,
Any help will be appreciated.
I am getting some loader issue in above 10 version.
In version , 9.3.1 , I am not facing issue.
Assuming you use cypress-cucumber-preprocessor, there was an issue raised Update plugin to be compatible with Cypress 10 #722 which has now been resolved.
Check your pacakge.json and make sure you are using cypress-cucumber-preprocessor version 11, if not uninstall and re-install the package.

Nextjs project stopped working locally all of a sudden

I have been working on a nextjs project locally as I usually do, but all of a sudden, the website stopped working on localhost!
I kept getting this error in the console:
crbug/1173575, non-JS module files deprecated.
System and libraries versions:
OS: Ubuntu 18.04
Node: 14.15.1
Nextjs: 9.5.2
Chrome: 92.0.4515.131 (Official Build) (64-bit)
Firefox: 90.0.2 (64-bit)
start script: NODE_ENV=development node server.js
I have witnessed the same issue on both chrome and Firefox.
I have seen a lot of solutions for this problem, but nothing worked.
After a little debugging and commenting out many parts of the code, I managed to locate the issue.
Basically, it occurs on the backend; not the frontend.
There was an infinite loop that kept responses stuck. Fixing that issue, solved it for me.

NodeJS does not work after uprading from version 8.11.1

I decided to upgrade my version of nodejs from 8.11.1 to 10.15.3. I am running on Windows 10 so I downloaded v10.15.3-x64.msi file. I created a brand new Angular application from "ng new" command and I got the "HTTP ERROR 400" page with no error in the console.
I have cleared the cache, reboot the system and nothing helps. When I will go back to node JS version 8.11.1 everything starts to work again. The newest version of nodejs v11.11.0-x86.msi also doesn't work for me.
How this can happen and how can I get any information what is going on?
EDIT: this is not a duplication of any existing topics about upgrading NodeJS, because the new version is seen by the system and all components - see the console result in the screenshot I provided. After upgrading the NodeJs all my solutions based on that technology stoped working showing HTTP Error 400 page. After degrading to v8 everything starts working again.
The problem came back when I had to install newer version of node (12.14.1), so this time it worked. Additionally I deleted folders that prompted from runnig where npm command after deleting an old version.

Timeout in Calabash tests

I have updated the calabash gem to the latest version(0.20.0) and tried to run the tests on iOS 10 devices. The issue I am facing is that the first test executes as expected but the consecutive tests are failing with the following error message:
Timed out after 60.04 seconds executing
with a timeout of 60
(RunLoop::Shell::TimeoutError)
I get the following warning message on the console, however I am not sure if these are related with the issue.
WARN:
Calabash::Cucumber::Launcher #calabash_no_launch? and support for the NO_LAUNCH
environment variable has been removed from Calabash. This always returns
true. Please remove this method call from your hooks.
WARN: The server version is not compatible with gem version.
Please update your server.
https://github.com/calabash/calabash-ios/wiki/Updating-your-Calabash-iOS-version
gem version: '0.20.0'
min server version: '0.20.0'
server version: '0.19.1'
Could you please share your thoughts on this issue.
Looks like you need to to a 'bundle exec calabash-ios download' again so you can download the latest version of the Calabash server that matches what you have installed which is 0.20.0 and then rebuild your app in Xcode with that framework added. Then use that version for testing. Or, if your build server is doing the work, you just need to update the gem on your build server and rebuild.

Resources