1
votes

typescript error property 'hideKeyboardAccessoryBar' does not exist on type 'Keyboard'. on IONIC Moodle App

ionic error cmd Ionic error cmd

CMD Showing following Error

[14:58:02] ionic-app-scripts 3.1.9

[14:58:02] build dev started ...

(node:8056) ExperimentalWarning: The fs.promises API is experimental

[14:58:03] clean started ...

[14:58:03] clean finished in 307 ms

[14:58:03] copy started ...

[14:58:13] copy finished in 9.26 s

[14:58:13] deeplinks started ...

[14:58:19] deeplinks finished in 5.41 s

[14:58:19] transpile started ...

[15:00:00] typescript: F:/akas/android/clidemoodle/src/app/app.component.ts, line: 52

        Property 'hideKeyboardAccessoryBar' does not exist on type 'Keyboard'.



  L51:      // Unload lang custom strings.

  L52:      this.langProvider.clearCustomStrings();

  L53:  });

[15:00:00] typescript: F:/akas/android/clidemoodle/src/providers/app.ts, line: 120

        Property 'close' does not exist on type 'Keyboard'.



 L120:   * Get the app's root NavController.

[15:00:00] ionic-app-script task: "build"

[15:00:00] Error: Failed to transpile program

Error: Failed to transpile program

at new BuildError (F:\akas\android\clidemoodle\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)

at F:\akas\android\clidemoodle\node_modules\@ionic\app-scripts\dist\transpile.js:159:20

at new Promise (<anonymous>)

at transpileWorker (F:\akas\android\clidemoodle\node_modules\@ionic\app-scripts\dist\transpile.js:107:12)

at Object.transpile (F:\akas\android\clidemoodle\node_modules\@ionic\app-scripts\dist\transpile.js:64:12)

at F:\akas\android\clidemoodle\node_modules\@ionic\app-scripts\dist\build.js:109:82

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] ionic:build: node --max-old-space-size=16384 ./node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build "--target" "cordova" "--platform" "android"

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] ionic:build script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\Clide\AppData\Roaming\npm-cache_logs\2018-11-29T09_30_00_720Z-debug.log

[ERROR] An error occurred while running subprocess npm.

    npm run ionic:build -- --target cordova --platform android exited with exit code 1.



    Re-running this command with the --verbose flag may provide more information.

ionic error moodle ionic error

2

2 Answers

2
votes

You are likely using the newer plugin cordova-plugin-ionic-keyboard which uses this.keyboard.hideFormAccessoryBar(true) instead of cordova-plugin-keyboard's hideKeyboardAccessoryBar and .hide() as opposed to .close()

https://ionicframework.com/docs/native/keyboard/

0
votes

I am facing the similar issue, i commented and tried it worked for me.

Just comment the hideKeyboardAccessoryBar and close in your

F:/akas/android/clidemoodle/src/app/app.component.ts
F:/akas/android/clidemoodle/src/providers/app.ts

Save and Run, I hope its should work.