Open ionitron-bot[bot] opened 5 years ago
Hi,
Did you find any solution? I am also facing same issue.
My use case:
Call JavaScript function from JS file (included in project) in Ionic 4 on particular page.
I'm having following issue.
ERROR TypeError: t.resolve is not a function at Object.setNativePromise (polyfills.js:3) at L.configurable.L.set (polyfills.js:3) at n.exports (ocw.js:4850) at a (ocw.js:4850) at Object.209.100 (ocw.js:4851) at s (ocw.js:4850) at ocw.js:4850 at Object.327.131 (ocw.js:4852) at s (ocw.js:4850) at ocw.js:4850 Steps followed:
Included JS file under src->assets added reference in index.html after cordova.js file
Run code snippetExpand snippet In desired file, declared variable as function name called javascript function under, ionViewDidLoad Ionic setup:
Ionic:
ionic (Ionic CLI) : 4.7.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 6.4.0, ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.0.2, (and 9 other plugins)
System:
ios-deploy : 1.9.2 ios-sim : 6.0.0 NodeJS : v8.12.0 (/usr/local/bin/node) npm : 6.4.1 OS : macOS Mojave Xcode : Xcode 10.1 Build version 10B61
Did anyone solve this issue?? I am stuck with this error and there is no solution found online!! Please help!!
TypeError: t.resolve is not a function
at Object.setNativePromise (http://localhost:8100/build/polyfills.js:3:18280)
at L.configurable.L.set (http://localhost:8100/build/polyfills.js:3:23002)
at module.exports (http://localhost:8100/build/vendor.js:170558:12)
at $export (http://localhost:8100/build/vendor.js:170321:17)
at Object.<anonymous> (http://localhost:8100/build/vendor.js:172252:1)
at __w_pdfjs_require__ (http://localhost:8100/build/vendor.js:168953:30)
at Object.<anonymous> (http://localhost:8100/build/vendor.js:171830:1)
at __w_pdfjs_require__ (http://localhost:8100/build/vendor.js:168953:30)
at checkPromise (http://localhost:8100/build/vendor.js:170161:27)
at Object.<anonymous> (http://localhost:8100/build/vendor.js:170162:5)
Had the same problem and I figured out a dumb solution. Everytime before serving (ionic serve), i did a npm i on the project and the error did not appear - but Subsequent ionic serve would show the error though. So everytime I needed to build I'd npm i and there would be no error. Its damn and might not work for everyone but helped me beat a critical deadline
Original issue by @HamzaLJ on 2017-11-19T19:19:29Z
Ionic version: (check one with "x") (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [ X ] 3.x [ ] 4.x
I'm submitting a ... (check one with "x") [ X ] bug report [ ] feature request
Current behavior: When running
ionic serve
on the browser if I do a right click, I get the following :Expected behavior: It shouldn't throw the error.
Steps to reproduce: Just do a right click and you'll get the error.
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):