JaneaSystems / nodejs-mobile-samples

Repository for demo applications that use Node.js on Mobile
MIT License
168 stars 111 forks source link

Cannot find Module '/data/user/0/<package name>/files/nodesjs-project/main.js' #18

Closed Isazaki closed 5 years ago

Isazaki commented 5 years ago

2019-04-26 09:00:37.232 12246-12329/? E/NODEJS-MOBILE: module.js:473 throw err; ^

Error: Cannot find module '/data/user/0/org.dhis2.mobile/files/nodejs-project/main.js'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:453:25)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:611:3
jaimecbernardo commented 5 years ago

Hi @Isazaki , This is not enough information to understand what could be going on. What plugin are you using? Do you have instructions on how to reproduce this error?

Isazaki commented 5 years ago

@jaimecbernardo I followed the installation sets for android studio. By plugins do you mean the Gradle configuration file??

jaimecbernardo commented 5 years ago

I meant if you were using cordova or react-native, but it's probably the native android scenario, then. Do you get the same error when trying to run either of these samples from the repo? https://github.com/janeasystems/nodejs-mobile-samples/tree/651937e419bf1c82fda1f06e8f9c828d5df86fbc/android

Isazaki commented 5 years ago

No I did not have errors when I ran that code. But when integrating that code with my android project it worked for a while then it failed after I updated my gradle to 5.1.1. After downgrading the gradle to 4.10.1 it started to work again.