logo
down
shadow

Ionic 2 Build TypeError: Cannot read property 'AssetUrl' of undefined


Ionic 2 Build TypeError: Cannot read property 'AssetUrl' of undefined

By : C. McLean
Date : November 20 2020, 11:01 PM
Hope that helps I did in CLI within the folder of the projet an "npm install" + take away "^" sign in front of "dependencies" and "devDependencies" in package.json (as advised in the forum threads which are linked in my question). And it solved it.
code :


Share : facebook icon twitter icon
Angularjs/Ionic TypeError: Cannot read property 'then' of undefined

Angularjs/Ionic TypeError: Cannot read property 'then' of undefined


By : Marcc777
Date : March 29 2020, 07:55 AM
help you fix your problem You need to return deferred.promise from the getMainMenuItems function instead of in the callback functions used for $http.jsonp. This is because getMainMenuItems needs to return a promise.
code :
angular.module('starter.services', ['ngResource'])
.factory('GetMainMenu',['$http','$q','$cacheFactory',function($http,$q,$cacheFactory) {
    var methodStr = 'JSONP';
    var urlStr = 'http://localhost/bd/wp-admin/admin-ajax.php';
    var ptStr = {action:'bd_get_main_menus',callback:'JSON_CALLBACK'};

    return {
        getMainMenuItems: function(){
            var deferred = $q.defer();

          $http.jsonp(urlStr,{params: ptStr})
                .success(function (data, status) {

                    deferred.resolve(data);
                })
                .error(function (data, status) {

                    deferred.reject(data);
                });

           return deferred.promise;
        }
    }
}])
return {
        getMainMenuItems: function(){
           return $http.jsonp(urlStr,{params: ptStr});
        };
Ionic: TypeError: Cannot read property 'ready' of undefined

Ionic: TypeError: Cannot read property 'ready' of undefined


By : Rhukhi
Date : March 29 2020, 07:55 AM
To fix this issue I am always getting this error: TypeError: Cannot read property 'ready' of undefined , I think you should declare your service function like this
code :
angular.module('app.services', [])
.service('DatabaseService', ['$cordovaSQLite', '$ionicPlatform', function($cordovaSQLite, $ionicPlatform) {

 // When you pass second argument of .service() as array, 
 // then the array should list all dependencies followed by function which use them 

}])
angular.module('app.services', [])
    .service('DatabaseService', function($cordovaSQLite, $ionicPlatform) {

     // or you can use a direct function with all dependencies as its parameter. 
     // But dependencies injection will break if you do code minification

    })
Angular 2 - Cannot read property 'AssetUrl' of undefined

Angular 2 - Cannot read property 'AssetUrl' of undefined


By : donm
Date : March 29 2020, 07:55 AM
will help you I faced similar issue. It seems to problem with new compiler-cli of Angular. I resolved it by adding following in devDependencies in package.json
code :
"@angular/compiler-cli": "^2.0.0"
ionic package build android FAILED due to TypeError: Cannot read property 'length' of undefined

ionic package build android FAILED due to TypeError: Cannot read property 'length' of undefined


By : wenbo
Date : March 29 2020, 07:55 AM
hope this fix your issue I just created a demo ionic project by ionic start conference, but when I tried to build the Android package, it tell me that TypeError: Cannot read property 'length' of undefined. , Use following command to build for android:
SQLite with Ionic 4? Cannot read property 'then' of undefined TypeError: Cannot read property 'then' of undefined

SQLite with Ionic 4? Cannot read property 'then' of undefined TypeError: Cannot read property 'then' of undefined


By : HujKurwa
Date : March 29 2020, 07:55 AM
Does that help First I had this error and I solved it. Ok, great. When I try to debug with my device (with ionic cordova run android). The database SQL does not loaded, it shows like has nothing or never was create the database sqlite. I check in the console and I see this:
code :
ionic cordova platform add browser
ionic cordova run browser
Related Posts Related Posts :
  • Raspberry Pi 3 script RAM usage
  • Received data from HTTP client is lost while sending it to a TCP server
  • harpjs not compiling stylus with harp server
  • node-postgres vs pg-promise for Nodejs Application
  • Deploy React Starter Kit (by Kriasoft) to Heroku
  • Heroku runs fine local but not online
  • What is the difference between the following two blocks of code?
  • I cannot emit any messages with socket.io
  • NPM refusing to install Semantic-UI
  • Entity key and data properties not defined when retrieving from local datastore
  • I keep getting Connot GET /auth/twitter/callback in my callbackURL when using passport. What am I doing wrong?
  • How to refer to another collection in MongoDB
  • Handle 404 error with Express 4
  • heroku git dependency propagation
  • moongose: reading data from mongodb with nodejs
  • Order by in nested eager loading in sequelize not working
  • Amazon SQS doesn't supply my worker instance with the full message
  • control flow of callbacks with db returns in node js
  • Deleting uploaded files in Node.js with MongoDB
  • AWS Lambda function to updload json to s3 bucket not working
  • Can't reach webside with pm2
  • Timeout when sending email using nodemailer behind a corporate proxy
  • Trouble adding item with PUT to dynamodb table: node.js aws-sdk
  • Mongoose - Search dates stored as strings by date range
  • Cookie not set (undefined) node js
  • How to pass JSON object from API to server
  • Configure sphinx to rank exact matching higher with morphology enabled
  • Can’t gracefully shut down a node + Express app (node http server's close function does not complete)
  • Executing local (--save-dev) tools by npm
  • gulp clean is not working in correct manner
  • Conditional Writes DynamoDB: Expected params.ExpressionAttributeValues[':p'] to be a structure
  • How to use ES6 and ES7 in my Gruntfile
  • How to include the 'many' part of a relation from the 'one of many' model?
  • Build webpack on travis ci
  • How to insert data to mongo synchronously (Nodejs, Express)
  • Round Image corners GM ImageMagic, pass options
  • Executing Jobs as other user
  • On node how to you perform an insert if doesn't exists
  • Node version error while deploying Angular2 app on Azure
  • Node async.js: callback is not a function error?
  • How do i get the redis store client from socket-io-redis?
  • Issues trying to run electron based application?
  • AWS Lambda function write to S3
  • Passport-jwt token expiration
  • Sails, Sockets, and Authorization
  • What's the difference when using gulp and opening index.html directly in this case?
  • Server with Nodejs and client with XMLHttpRequest
  • Sails JS file upload; how to check if file is an input?
  • Trouble using passport-azure-ad OIDCStrategy with Passportjs
  • How to use else statement in jade template?
  • NPM install always fails to fetch NPM registry in Docker container at random times
  • Chai expect assertion to.have.string failure: UnhandledPromiseRejectionWarning
  • Node.js & Redis & For Loop with bluebird Promises?
  • Loopback "params" for running native SQL queries
  • Do we need to push node_modules on bitbucket
  • Authenticating to Dynamics NAV for OData
  • Amazon MWS SubmitFeed Content-MD5 HTTP header did not match the Content-MD5 calculated by Amazon
  • How to change the npm prefix without config?
  • Upload a file to Google Cloud, in a specific directory
  • how to correctly serialize db.prepare in nodejs sqlite3
  • shadow
    Privacy Policy - Terms - Contact Us © soohba.com