Solved

2023R1 and getting started with Aurelia and TypeScript


Userlevel 2
Badge

Hi!

I am getting started with 2023R1 and its early offering of Modern UI development under Aurelia and TypeScript.

After a fresh install of the Site, I open the FrontendSources folder in VSCode and then from its Terminal tab

I execute the following 3 commands:

 

npm install --save-dev

npm run getmodules

npm run build

 

The first 2 commands appear to run just fine.

The 3rd command shows error:  TS2307: Cannot find module 'client-controls' or its corresponding type declarations.

I am fairly new to VSCode so I may be overlooking something, but how do I overcome this build error?

Files such as SO301000.ts show ‘client-controls’ with red squiggly error indication.

 

 

icon

Best answer by jedmunds36 9 August 2023, 14:07

View original

13 replies

Userlevel 3
Badge +2

Hi,

Could you try npm run build-dev?

This should provide more insight as to what might be going wrong.

Userlevel 2
Badge

I have attached the terminal output from the build-dev command.

Thanks!

Userlevel 7
Badge

Hi @jedmunds36 were you able to find a solution? Thank you!

Userlevel 2
Badge

No luck yet.  I plan to revisit in the following weeks.

Userlevel 2
Badge

Following up: 

I was able to make changes to SO301000.html and show them in the browser after upgrading to the 23.160 minor version.

However, when I try to make changes to the view.ts or SO301000.ts files, the “npm run watch” kicks off but states File Not Found error for these files.  Maybe that’s a leading path problem, as it states the path as:  

 

messageTemplate: 'file-not-found',
  messageData: {
    pattern: '../../../../../Apps/AcumaticaSite/FrontendSources/screen/src/screens/SO/SO301000/views.ts',
    globDisabled: false

 

I will post more as I learn.

 

 

Userlevel 2
Badge

I was able to overcome the error but I don’t think this is the accepted way:

Open the webpack.config.json file and at line 245, edit the runlinterplugin shown below by removing one of its “..\” path segments:

    if (!env.production) {
        plugins.push(new RunLinterPlugin('../../../../'));
    }
 

This might be ignoring linting altogether during “npm run build-dev” but after the build, and after changing directory “cd screen” and calling “npm run watch”, I can make changes to SO30100.ts and views.ts and expose things like the SOOrder.LastModifiedDateTime and a custom field on the SOLine called UsrPkgCode as shown below:

 

 

 
 
Userlevel 2
Badge

Lastly, if publishing existing Customization Projects and encounter the ”FilePathTooLong” error during Validation, the error can be overcome by temporarily removing the FrontEndSources folder from the site directory and then return it after a successful publish.  See also https://www.greytrix.com/blogs/acumatica/2022/04/29/acumatica-error-file-path-too-long-on-project-validation-or-publish/   for more on this error type.

 

 

Userlevel 6
Badge +3

I submitted a support case for this months ago and never received an answer on how to fix the “can’t find client-controls” folder.  I gave up.  I’m back at it now and I hoped that this would have been fixed in the current release.  

Have you found any way to get this working correctly (without hacking files)?

Userlevel 2
Badge

No luck yet.  I have postponed my exploration of Modern UI until 24R1.

 

Userlevel 6
Badge +3

Thanks for letting me know.  I’m glad it isn’t just me.  FYI, there are almost 100K files in the FrontendSources folder/subfolders.  No wonder it is hard to get it working.

Userlevel 6
Badge +3

@jedmunds36  

UPDATE...Acumatica support asked me to try with 24R1 Preview and like magic, it works.

Now I just want to find out where I can get a bit of training to understand how it works.

There was a general tutorial in the 2023 DEVCON.  I was able to access the recording of the conference many months ago, but I can no longer find it.

Does anyone know where I can access the recordings from the DEVCON 2023?

Userlevel 7
Badge

Hi @Joe Schmucker - these? 

 

Userlevel 6
Badge +3

THANKS @Chris Hackett !!!  YES!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved