Expand my Community achievements bar.

AEM Cloud TypeScript Dependencies

Avatar

Community Advisor

Hello,

 

We have received an email from Adobe, for AEM Cloud Instance that says, Review and Update Your TypeScript Dependencies

I want to know if we fix it, how to verify if it fixes the issue.

4 Replies

Avatar

Community Advisor

Hi, 

Are you seeing warning (WARN) messages during the build time of your project? If you receive a list of dependencies to update from Adobe, you cross-check to ensure they match the listed ones. Another way to check for outdated dependencies is by using "npm outdated". Once you fix the issues, you rerun the command and double-check that everything is okay. Here is a link for reference: https://sebhastian.com/npm-outdated/

 

Hope this helps.



Esteban Bustamante

Avatar

Community Advisor

Hey,

 

It looks like your typescript version is using incompatible versions because of the allowed versions declared in your package.json, so Adobe is suggesting you just pin them in a more "strict" way.


So, to validate this, after you apply the changes and add the package-lock.json file, delete the node-modules folder and run "npm install" to ensure that your project's dependencies are installed based on the updated package.json and package-lock.json files. During the installation process, pay attention to any warning messages related to dependency versions. If there are no warnings, it indicates that your dependencies are now pinned to compatible versions as recommended. Ensure that the build process completes successfully without any errors. And lastly, pay particular attention to any functionality that relies on TypeScript definitions.

 

Hope this helps

 



Esteban Bustamante

Avatar

Level 3

We can resolve this issue by updating the TypeScript models version and ensuring compatibility with the node and npm versions.

 

To address warnings related to TypeScript:

  1. Navigate to the ui.frontend folder.
  2. Delete the node_modules folder.
  3. Run the command npm install.

 

Executing this command will display all warnings associated with TypeScript during the installation process.

The following versions have been tested and are confirmed to be free of TypeScript errors:

- Node version: 16.17.0
- NPM version: 8.15.0

 

TypeScript Dependencies:
- babel/preset-typescript: 7.16.7
- typescript-eslint/eslint-plugin: 5.49.0
- typescript-eslint/parser: 5.49.0
- tsconfig-paths-webpack-plugin: 4.0.0
- typescript: 5.1.3

 

Note: Adobe recommends committing the package-lock.json file. However, it's unnecessary to manually commit this file as the "npm install" command automatically updates the package-lock.json file.