Forum Discussion

yogeshdixit's avatar
2 months ago

Aurora externalContext module issue

Hi All,

I am working with a custom component in Aurora using React and TypeScript, but I am encountering a "module not found" error, as shown in the screenshot. Can anyone suggest where I might be going wrong?

Additionally, I am unable to import the .pcss file for styling the component. Any help would be appreciated!

I followed the Khoros Aurora documentation, where they provided the CatFactToast component. Below is my folder structure.

When i am importing the CatFactToast.module.pcss file in CatFactToast.tsx then it is not showing the file in the relative path as shown in the screenshot below

 

Thanks!

  • First, make sure you have the latest SDK installed (24.8). You can update this in package.json, then run npm install.

    If that doesn't resolve it, go into tsconfig.json and make sure your "include" line looks like

    "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx", "types/**/*.ts"],

    After saving tsconfig.json, and that STILL doesn't fix it, in VSCode try the following:

    1. Type ctrl/cmd + shift + p to open the command pallette
    2. Search for "Typescript: Restart TS Server" and click on that
    3. Give VS Code a moment to restart the TS Server (check status bar at bottom) and it should resolve your TS errors
  • MattV's avatar
    MattV
    Khoros Staff

    First, make sure you have the latest SDK installed (24.8). You can update this in package.json, then run npm install.

    If that doesn't resolve it, go into tsconfig.json and make sure your "include" line looks like

    "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx", "types/**/*.ts"],

    After saving tsconfig.json, and that STILL doesn't fix it, in VSCode try the following:

    1. Type ctrl/cmd + shift + p to open the command pallette
    2. Search for "Typescript: Restart TS Server" and click on that
    3. Give VS Code a moment to restart the TS Server (check status bar at bottom) and it should resolve your TS errors
  • Hi MattV,

    Thank you for the support. I followed the steps you provided, but the issue is still not resolved.

    I have the Aurora SDK version is 24.10.0-pre.8


    Below is my tsconfig.json file

    Thanks!