Native Mobile: Error While Running Locally due to Missing Files

Good day,   I recently upgraded my application to Mendix 9.24.0 and added Native capabilities to it. However, when I run the application locally and try and access the Native application using the Mendix Make it Native 9 application I get the following errors:     In the native_packager_log the errors I get are the following:   [Output] error: Error: Unable to resolve module ../../../theme/native/exclusion-variables from C:\Users\bdeic\Documents\Mendix\GoingNaturalApp-20221228_DecemberRelease_V1\themesource\atlas_core\native\main.js: [Output] None of these files exist: [Output] * ..\..\theme\native\exclusion-variables(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.cjs|.native.cjs|.cjs|.android.mjs|.native.mjs|.mjs|.android.json|.native.json|.json|.android.js_commonjs-exports|.native.js_commonjs-exports|.js_commonjs-exports|.android.js_commonjs-module|.native.js_commonjs-module|.js_commonjs-module) [Output] * ..\..\theme\native\exclusion-variables\index(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.cjs|.native.cjs|.cjs|.android.mjs|.native.mjs|.mjs|.android.json|.native.json|.json|.android.js_commonjs-exports|.native.js_commonjs-exports|.js_commonjs-exports|.android.js_commonjs-module|.native.js_commonjs-module|.js_commonjs-module) [Output] > 1 | import * as exclusionVariables from "../../../theme/native/exclusion-variables"; [Output] | ^ [Output] 2 | // ================================== CORE ==================================\\ [Output] 3 | // [Output] 4 | // [Output] at ModuleResolver.resolveDependency (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:152:15) [Output] at DependencyGraph.resolveDependency (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\node-haste\DependencyGraph.js:264:43) [Output] at Object.resolve (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\lib\transformHelpers.js:170:21) [Output] at resolveDependencies (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\DeltaBundler\graphOperations.js:466:33) [Output] at processModule (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\DeltaBundler\graphOperations.js:232:31) [Output] at async addDependency (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\DeltaBundler\graphOperations.js:361:18) [Output] at async Promise.all (index 5) [Output] at async processModule (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\DeltaBundler\graphOperations.js:279:3) [Output] at async addDependency (C:\Program Files\Mendix\\modeler\tools\node\node_modules\metro\src\DeltaBundler\graphOperations.js:361:18) [Output] at async Promise.all (index 1) [Output] MxTerminalReporter: {"event":"bundling_error","name":"Error","message":"Unable to resolve module ../../../theme/native/exclusion-variables from C:\\Users\\bdeic\\Documents\\Mendix\\GoingNaturalApp-20221228_DecemberRelease_V1\\themesource\\atlas_core\\native\\main.js: \n\nNone of these files exist:\n * ..\\..\\theme\\native\\exclusion-variables(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.cjs|.native.cjs|.cjs|.android.mjs|.native.mjs|.mjs|.android.json|.native.json|.json|.android.js_commonjs-exports|.native.js_commonjs-exports|.js_commonjs-exports|.android.js_commonjs-module|.native.js_commonjs-module|.js_commonjs-module)\n * ..\\..\\theme\\native\\exclusion-variables\\index(.native|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.cjs|.native.cjs|.cjs|.android.mjs|.native.mjs|.mjs|.android.json|.native.json|.json|.android.js_commonjs-exports|.native.js_commonjs-exports|.js_commonjs-exports|.android.js_commonjs-module|.native.js_commonjs-module|.js_commonjs-module)\n\u001b[0m\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 1 |\u001b[39m \u001b[36mimport\u001b[39m \u001b[33m*\u001b[39m \u001b[36mas\u001b[39m exclusionVariables \u001b[36mfrom\u001b[39m \u001b[32m\"../../../theme/native/exclusion-variables\"\u001b[39m\u001b[33m;\u001b[39m\u001b[0m\n\u001b[0m \u001b[90m |\u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\u001b[0m\n\u001b[0m \u001b[90m 2 |\u001b[39m \u001b[90m// ================================== CORE ==================================\\\\\u001b[39m\u001b[0m\n\u001b[0m \u001b[90m 3 |\u001b[39m \u001b[90m//\u001b[39m\u001b[0m\n\u001b[0m \u001b[90m 4 |\u001b[39m \u001b[90m//\u001b[39m\u001b[0m"} [Output] MxTerminalReporter: {"event":"bundle_build_started"} [Output] BUNDLE ./index.js I’m aware that files are missing, but I do not know how I can restore or create them properly.
3 answers

Any update on this topic? I am facing the same issue


Cleaning the deployment directory and then running again worked for me


Finally found the solution to the issue!


The issue was that the main.js and exclusion-variables.js files were missing from the native directory in the App Explorer.


I used a new blank native project to compare the folder structure and finally came across these files.



I created the main.js and exclusion-variables.js files and copied contents of the brand new project files to these files. I also reviewed the theme, themesource and other theme folders, but no additions there made an impact on the application running, so I don’t think those are of consequence.



export {};


// == Variables to exclude files
// ## Reduce the amount of files imported from the Atlas_Core module
// -------------------------------------------------------------------------------------------------------------------//
// Accordion
export const excludeAccordion = false;
export const excludeAccordionHelpers = false;
// Activity Indicator
export const excludeActivityIndicator = false;
export const excludeActivityIndicatorHelpers = false;
// Animation
export const excludeAnimation = false;
// Background Image
export const excludeBackgroundImage = false;
// Badge
export const excludeBadge = false;
export const excludeBadgeHelpers = false;
// Bottom Sheet
export const excludeBottomSheet = false;
// Buttons
export const excludeButtons = false;
export const excludeButtonsHelpers = false;
// Carousel
export const excludeCarousel = false;
// CheckBox
export const excludeCheckBox = false;
// Color Picker
export const excludeColorPicker = false;
// Container
export const excludeContainer = false;
// Date Picker
export const excludeDatePicker = false;
// Drop Down
export const excludeDropDown = false;
// Feedback
export const excludeFeedback = false;
// Floating Action Button
export const excludeFAB = false;
export const excludeFABHelpers = false;
// Image
export const excludeImage = false;
export const excludeImageHelpers = false;
// Intro Screen
export const excludeIntroScreen = false;
export const excludeIntroScreenHelpers = false;
// Layout Grid
export const excludeLayoutGrid = false;
// Line Chart
export const excludeLineChart = false;
export const excludeLineChartHelpers = false;
// Bar Chart
export const excludeBarChart = false;
export const excludeBarChartHelpers = false;
// List View
export const excludeListView = false;
export const excludeListViewHelpers = false;
// List View Swipe
export const excludeListViewSwipe = false;
export const excludeListViewSwipeHelpers = false;
// Maps
export const excludeMaps = false;
export const excludeMapsHelpers = false;
// Page Title
export const excludePageTitle = false;
// Pie Doughnut Chart
export const excludePieDoughnutChart = false;
// Progress Bar
export const excludeProgressBar = false;
export const excludeProgressBarHelpers = false;
// Progress Circle
export const excludeProgressCircle = false;
export const excludeProgressCircleHelpers = false;
// Pop Up Menu
export const excludePopUpMenu = false;
// QR Code
export const excludeQRCode = false;
// Range Slider
export const excludeRangeSlider = false;
export const excludeRangeSliderHelpers = false;
// Rating
export const excludeRating = false;
// Reference Selector
export const excludeReferenceSelector = false;
// Safe Area View
export const excludeSafeAreaView = false;
// Slider
export const excludeSlider = false;
export const excludeSliderHelpers = false;
// Switch
export const excludeSwitch = false;
export const excludeSwitchHelpers = false;
// Tab Container
export const excludeTabContainer = false;
export const excludeTabContainerHelpers = false;
// Text Area
export const excludeTextArea = false;
// Text Box
export const excludeTextBox = false;
export const excludeTextBoxHelpers = false;
// Toggle Buttons
export const excludeToggleButtons = false;
// Typography
export const excludeTypography = false;
export const excludeTypographyHelpers = false;
// VideoPlayer
export const excludeVideoPlayer = false;
// Web View
export const excludeWebView = false;
// Helper Classes
export const excludeHelpers = false;
// Radio Buttons
export const excludeRadioButtons = false;
export const excludeRadioButtonsHelper = false;
// Background Gradient
export const excludeBackgroundGradient = false;
export const excludeBackgroundGradientHelper = false;
// Column Chart
export const excludeColumnChart = false;
export const excludeColumnChartHelper = false;
// Gallery
export const excludeGallery = false;
export const excludeGalleryHelper = false;
// Gallery Text Filter
export const excludeGalleryTextFilter = false;
export const excludeGalleryTextFilterHelper = false;