question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

require-vue not working when run cordova app in IOS

See original GitHub issue

Everything working fine except IOS.

Error: Load timeout for modules: vue!components/test.vue_unnormalized2,vue!components/test.vue http://requirejs.org/docs/errors.html#timeout


var asyncComp = function (componentName) {
        return function (resolve) {
            require([componentName], resolve);
        };
    };
       
       
    var router = new VueRouter({
        routes: [
            {path: "", name: test", component: asyncComp("vue!components/test")}
                
        ]
    });

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
edgardlealcommented, Feb 4, 2018

If you want, you can use this version for now: developer/require-vuejs.js , but i steel working to improve timeout and general script handler.

2reactions
ksankumarcommented, Feb 1, 2018

@edgardleal

I found the issue in your code which is making http call for pulling vue component

if (xhttp.readyState === 4 && this.status < 400) {
              callback(parse(xhttp.responseText));
}

Change this.readystate to xhttp.readyState.

this.readyState causing issue in ios hybrid app(cordova).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cordova: app not working anymore on ios since few months ...
Run a build of your app under the Xcode debugger with the main thread checker enabled and see where the crash occurs. –...
Read more >
Debugger does nothing when attaching to iOS device #561
At first, I run the app from the cordova_app folder and then attach to it with Attach to running iOS on device debug...
Read more >
iOS Platform Guide - Apache Cordova
The ios-deploy tools allow you to launch iOS apps on an iOS Device from the command-line. Install ios-deploy via Homebrew by running: $...
Read more >
[Done]-Vue can't listen to Cordova events - appsloveworld
I am trying to build a hybrid-app with Cordova . I am using VueJS for routing and AJAX requests. Unfortunately I am not...
Read more >
Will Cordova applications that dow… | Apple Developer Forums
In the Developer Agreement (maybe section 3.3.2), there is an explicit exception to the prohibition against running downloaded code, allowing JavaScript run ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found