React-Native Unresolved Modules/ Module doesnt work

Hi Guys, For those who want to add npm packages to their projects but cannot test locally due to “unresolved module” error; here is the solution: Create a Custom Make it Native app (how to create custom Make It Native App). Add your npm packages to your app and commit to your git repo. Go to the Mendix Modeler and create another apk, which will include the packages you installed. Use command prompt to navigate to your Mendix project > javascriptsource> {mendix module}> actions and run “npm install xyz” – whereby “xyz” is the package you are trying to install. This will create node_modules folder in your actions directory, which will be used by metro.js when testing locally. Run your application locally and use the generated apk to test. For more info on how to extend your mendix native app, click here I hope you have found this helpful and happy developing. Cheers!
0 answers