This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12319|Reply: 1

[ionic] ionic Common Error Summary

[Copy link]
Posted on 6/27/2018 4:01:39 PM | | | |
Uncaught (in promise): TypeError: Cannot read property 'nativeElement' of undefined
TypeError: Cannot read property 'nativeElement' of undefined
    at new MapPage (http://localhost:8100/build/main.js:70:48)
    at createClass (http://localhost:8100/build/vendor.js:12857:20)
    at createDirectiveInstance (http://localhost:8100/build/vendor.js:12700:37)
    at createViewNodes (http://localhost:8100/build/vendor.js:14158:53)
    at createRootView (http://localhost:8100/build/vendor.js:14047:5)
    at callWithDebugContext (http://localhost:8100/build/vendor.js:15472:42)
    at Object.debugCreateRootView [as createRootView] (http://localhost:8100/build/vendor.js:14755:12)
    at ComponentFactory_.create (http://localhost:8100/build/vendor.js:11652:46)
    at ComponentFactoryBoundToModule.create (http://localhost:8100/build/vendor.js:4404:29)
    at Tab.NavControllerBase._viewInit (http://localhost:8100/build/vendor.js:51917:44)


The reason for the error is that the html is not fully loaded to get the node content report in the html!

Solution:

Write the code into the "ionViewDidLoad" method!




Previous:Baidu Maps applies for Android SDK key
Next:CentOS 7 runs the .NET Core website error solution
 Landlord| Posted on 7/4/2018 2:07:24 PM |
The error is as follows:



C:\project\android\myApp>ionic cordova platform  add browser
> cordova platform add browser --save
Using cordova-fetch for cordova-browser@~5.0.1

(node:292) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch platform cordova-browser@~5.0.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 4294963248 Error output:
npm ERR! path C:\project\android\myApp\node_modules\fsevents\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'C:\project\android\myApp\node_modules\fsevents\node_modules'
npm ERR!  { Error: EPERM: operation not permitted, lstat 'C:\project\android\myApp\node_modules\fsevents\node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, lstat \'C:\\project\\android\\myApp\\node_modules\\fsevents\\node_modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'lstat',
npm ERR!   path: 'C:\\project\\android\\myApp\\node_modules\\fsevents\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\itsvse_pc\AppData\Roaming\npm-cache\_logs\2018-07-04T06_03_57_026Z-debug.log
(node:292) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Solution:

The reason for the error is that we have started the browser service "ionic serve", and the browser service is closed!! Just re-execute the top command!

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com