Categories
Mastering Development

why my callback function does not work in typescript?

I use angular with typescript, in the call to the callback function the compiler tells me: TS1138 error: Parameter declaration expected. I can’t understand where the error is TS—–> processFen(callback) { let data_request = localStorage.getItem(“arrayActualizar”); callback(); console.log(“fen actualizado, datos del backend update—->”, this.data.code); this.shellService.processFen(this.estado).subscribe((data)=>{ this.data = data; console.log(“cambiado estado fen, data del backend process—->”, this.data.code); […]

Categories
Mastering Development

Stripe – global is not defined

I have a problem when I want to use the stripe API. Environnement : “devDependencies”: { “@angular-devkit/build-angular”: “~0.803.20”, “@angular/cli”: “~8.3.23”, “@angular/compiler”: “~8.2.14”, “@angular/compiler-cli”: “~8.2.14”, “@angular/language-service”: “~8.2.14”, “@ionic/angular-toolkit”: “^2.1.1”, “@types/node”: “^8.9.5”, “ts-node”: “~7.0.0”, “tslint”: “~5.15.0”, “typescript”: “~3.4.3” }, “dependencies”: { “@angular/common”: “~8.2.14”, “@angular/core”: “~8.2.14”, “@angular/forms”: “~8.2.14”, “@angular/platform-browser”: “~8.2.14”, “@angular/platform-browser-dynamic”: “~8.2.14”, “@angular/router”: “~8.2.14”, “@ionic-native/core”: “^5.0.0”, “@ionic/angular”: “^5.0.0”, […]

Categories
Development

Angular 8: Chrome developer tools no longer work

I recently updated from Angular 7 to Angular 8. Now when I try to use the developer tools in Chrome, nothing shows up, and the JavaScript console shows this: Uncaught TypeError: document.registerElement is not a function at Object.UI.registerCustomElement (shell.js:formatted:18064) at shell.js:formatted:18178 at shell.js:formatted:18266 devtools_app.js:formatted:2606 Uncaught ReferenceError: SDK is not defined at devtools_app.js:formatted:2606 The code in […]

Categories
Development

How to run Ionic project with capacitor?

I want to run my Ionic project with capacitor and I have tried different way to run Ionic project with capacitor even I have created an Ionic blank project using Ionic CLI but I can’t do that because of this android studio error: error: resource style/Base.V28.Theme.AppCompat.Light (aka com.mahdi.myapp2:style/Base.V28.Theme.AppCompat.Light) not found. This error occurs when I […]

Categories
Development

Angular CLI E2E Testing Wrong ChromeDriver

I am using the angular CLI. I created it with: ng new MyFirstApp I then tried to run the end to end tests with: ng e2e I got the following error message: E/launcher – session not created: This version of ChromeDriver only supports Chrome version 79 Driver info: chromedriver=79.0.3945.16 at Object.checkLegacyResponse (C:\TestProj\Angular\MyFirstApp\node_modules\selenium-webdriver\lib\error.js:546:15) at parseHttpResponse (C:\TestProj\Angular\MyFirstApp\node_modules\selenium-webdriver\lib\http.js:509:13) […]

Categories
Development

“An accessor cannot be declared in an ambient context.” in a custom library

I have a webpack, typescript project (A) which emits a small library. The library is used in an angular 8 project (B). In project A I declare a class like: export class Foo { private foo: string; constructor(foo: string) { this.foo = foo; } } export class Bar extends Foo { private bla: string; constructor(foo: […]

Categories
Development

Error Uncaught (in promise): TypeError: Object(…) is not a function

Whenever I start my angular app I have this error: ERROR Error: Uncaught (in promise): TypeError: Object(…) is not a function TypeError: Object(…) is not a function at default~app-app-module~9ca28b07.js:4519 at Module../node_modules/cdk-table-exporter/fesm5/cdk-table-exporter.js (default~app-app-module~9ca28b07.js:4521) at __webpack_require__ (bootstrap:83) at Module../node_modules/mat-table-exporter/fesm5/mat-table-exporter.js (default~app-app-module~9ca28b07.js:5013) at __webpack_require__ (bootstrap:83) at Module../src/app/app-material.module.ts (default~app-app-module~9ca28b07.js:36901) at __webpack_require__ (bootstrap:83) at Module../src/app/app.module.ts (it.js:47) at __webpack_require__ (bootstrap:83) at main-wqrng.js?v=92fb42:43 […]

Categories
Angular Chrome Development Heroku Website

Trying to deploy Angular 8 app to Heroku – build successful but heroku saying ‘Not Found’

I am trying to deploy my angular app to heroku, the builds are successful but when i go to my link, it is telling me ‘Not Found’. I am really confused as to what is going on because I have visited various websites which go through the steps and I am sure that I am […]

Categories
Development Google

`sh: 1: ng: not found` when I run Google Cloud’s `gcloud app deploy`

I’ve looked at both this question and this issue, and tried what they suggest, but neither appear to solve my problem. Below is how I have the project configured; if it matters, I try to deploy through the Cloud Shell. app.yaml: runtime: custom env: flex manual_scaling: instances: 1 Dockerfile: FROM alpine:latest MAINTAINER my-username # update […]

Categories
Development

NPM Install failing with multiple error(error number 1). How to resolve?

I have a angular project. I have my package.json file. I am trying to do npm install. But its failing with an error. Node version – 12.13.0 angular cli – 7.2.4 gyp ERR! configure error gyp ERR! stack Error: unable to verify the first certificate gyp ERR! stack at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34) gyp ERR! stack at […]