Skip to main content
Answer

Modern UI 2024R2

  • December 27, 2024
  • 3 replies
  • 260 views

Forum|alt.badge.img

I have installed training instance - SmartFix_T290 and following “Modern UI Development: Building of the Source Code” course.

On step 3. Use Windows PowerShell or a similar program to run the following command in the FrontendSources folder.

npm run getmodules

receive error message 

 Starting 'i_controls outlook-plugin'...
[11:37:54] 'i_controls outlook-plugin' errored after 5.49 ms
[11:37:54] Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:753:9)

Use local instance with http: request.

Outlook-pugin can only be used on https.

 

Any idea how to fix this problem?

Best answer by Marco Villasenor

Hi ​@nadiyahnatyuk58 this is caused by a security update in Node.js. Specifically, if your Node.js version is v18 or newer.

Here is more detail from the security update:

It is important to note that there has been a breaking change for Windows users who utilize child_process.spawn and child_process.spawnSync. Node.js will now error with EINVAL if a .bat or .cmd file is passed to child_process.spawn and child_process.spawnSync without the shell option set. If the input to spawn/spawnSync is sanitized, users can now pass { shell: true } as an option to prevent the occurrence of EINVALs errors.

Since the command calls the spawn method without the “shell” option, the script fails with that error.

I fixed it by adding the option in the gulp-tools.ts file that is in the /FrontendSources folder. Just modify line 108 to look like this:


    const cmd = spawn(command, args, { cwd, shell: true });

After this the command should run without issues.

3 replies

Marco Villasenor
Jr Varsity II
Forum|alt.badge.img+2

Hi ​@nadiyahnatyuk58 this is caused by a security update in Node.js. Specifically, if your Node.js version is v18 or newer.

Here is more detail from the security update:

It is important to note that there has been a breaking change for Windows users who utilize child_process.spawn and child_process.spawnSync. Node.js will now error with EINVAL if a .bat or .cmd file is passed to child_process.spawn and child_process.spawnSync without the shell option set. If the input to spawn/spawnSync is sanitized, users can now pass { shell: true } as an option to prevent the occurrence of EINVALs errors.

Since the command calls the spawn method without the “shell” option, the script fails with that error.

I fixed it by adding the option in the gulp-tools.ts file that is in the /FrontendSources folder. Just modify line 108 to look like this:


    const cmd = spawn(command, args, { cwd, shell: true });

After this the command should run without issues.


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • December 27, 2024

Thank you Marco! It worked!!!

 


  • Freshman I
  • September 28, 2025

I’ve run into similar issues when following the “Modern UI Development: Building of the Source Code” course with a training instance. On step 3 (npm run getmodules), I also received an error during the i_controls outlook-plugin task:

 

Starting 'i_controls outlook-plugin'... Error: spawn EINVAL

From what I’ve seen, this can sometimes happen if the local instance is running on HTTP while the Outlook plugin requires HTTPS.

Has anyone found a reliable way to resolve this? Should the fix be applied at the Node.js/PowerShell level, or is it more about setting up HTTPS for the local instance?

I’m also considering reaching out to a web design agency since they often deal with secure integrations, frontend build processes and HTTPS setup, which might help streamline this kind of issue.