Issue
When setting up an automated pipeline to build and deploy a Mendix package using the MxBuild executable, the build process fails during JavaScript action compilation with the following error:
ERROR: An error occurred while compiling JavaScript actions ERROR in ../../../../../../../root/tmp/jsactions.js 1:0 Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (1:0)
Environment
Studio Pro (all versions)
Cause
A conflict between the globally installed Node.js version (for example, version 22.12.0) and the Node.js version bundled with MxBuild (for example, version 22.17.0) causes this issue. When MxBuild is executed in an environment with a globally installed Node.js version, it uses the global Node.js installation rather than its bundled version, causing JavaScript module parsing errors during the build.
Solution/Workaround
To resolve this issue, remove the globally installed Node.js from the system running MxBuild.
Internal information related
#267231
Additional information
Mendix documentation: MxBuild
0 Comments