Skip to main content
Answer

T290 Course npm run build-dev error "Task never defined"

  • May 2, 2025
  • 10 replies
  • 162 views

Forum|alt.badge.img+1

I’m trying to work through course T290 using 24.211.0024 (2025R1) and have got stuck with the step where I compile screen RS201000 using the command:

npm run build-dev -- --env screenIds=RS201000

This fails with the error:

Task never defined: screenIds=RS201000

 

Has anyone seen this before and knows how to resolve it?

 

Other npm commands work OK. 

I needed to execute  Set-ExecutionPolicy RemoteSigned  before npm would run at all. And edit gulp-tools to resolve the message Error: spawn EINVAL by changing line 108 from const cmd = spawn(command, args, { cwd, }); to const cmd = spawn(command, args, { cwd, shell: true });

Also “npm run build-dev” works without the extra parameters.

Best answer by darylbowman

I believe the culprit here may be not having run npm run getmodules from ~\FrontendSources first. This downloads dependencies and creates custom actions build, build-dev, etc.

I believe you also need to use npm run getmodules after running npm run build, since this cleans the dependencies.

10 replies

darylbowman
Captain II
Forum|alt.badge.img+15

What directory are you running the command in?


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • May 5, 2025

T290 using 24.211.0024 (2025R1)

Is it 24R2 or is it 25R1 you are having issue with.

for 24R2 syntax uses two dashes (--) like

npm run build-dev -- --env screenIds=RS201000

 

However for 25R1, you should use three dashes:

npm run build-dev --- --env screenIds=RS201000

 

I think T290 course was developed with 24R2 and might have old documentation. Maybe try and see if it helps.

 


darylbowman
Captain II
Forum|alt.badge.img+15

@RohitRattan88 - I’ve been using two in 25 R1 and it’s been working fine


Forum|alt.badge.img+1

@RohitRattan88 I tried using three dashes and the command succeeded, but it took as long to complete as it took without the parameters, suggesting that the filter had no effect.

The T290 course documentation is labelled 2024R2.

@darylbowman I’ve tried from the FrontendSources folder and also from the screen sub-directory.


darylbowman
Captain II
Forum|alt.badge.img+15

In my experience, you can run build-dev from FrontendSources, but a specific screen needs to be in FrontendSources\screens (I think)


Forum|alt.badge.img+1

Thanks ​@darylbowman. That’s seems to move me forward. I get a different error now :-)

[webpack-cli] Failed to load 'C:\Program Files\Acumatica ERP\ModernUI_T290\FrontendSources\screen\webpack.config.ts' config

[webpack-cli] SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]:   x The angle-bracket syntax for type assertions, `<T>expr`, is not supported in type strip mode. Instead, use the 'as' syntax: `expr as T`.

     ,-[426:1]

 423 |                         ];

 424 |                         // disabling screen info cache for customizations

 425 |                         options.cache = undefined;

 426 | ,->                     options.roots = <any> {

 427 | |                           customizationRoot: tenantFolder,

 428 | |                           screensRoot: "src/screens"

 429 | `->                     };

 430 |                         options.watch = env.watch;

 431 |                     }

 431 |                 }

     `----

    at parseTypeScript (node:internal/modules/typescript:67:15)

 

Any ideas?

(node --version  gives v23.11.0
 npm --version   gives 10.9.2)


darylbowman
Captain II
Forum|alt.badge.img+15

That looks like an Acumatica question. I don’t think I can help with that.


Forum|alt.badge.img+1

I’ve abandoned this attempt. Now getting ERR_MODULE_NOT_FOUND when running npm get modules, and npm run build-dev.


Joe Schmucker
Captain II
Forum|alt.badge.img+3

@RohitRattan88  3 dashes.  Thank you!


darylbowman
Captain II
Forum|alt.badge.img+15
  • Answer
  • July 24, 2025

I believe the culprit here may be not having run npm run getmodules from ~\FrontendSources first. This downloads dependencies and creates custom actions build, build-dev, etc.

I believe you also need to use npm run getmodules after running npm run build, since this cleans the dependencies.