Cannot find module that I created?

Hi there,

I’m getting really frustrated at an issue that I’m having, which I’m sure is something simple that I’m overlooking. I have a page called “AcidMushroomPage” which is in the directory “pages/crafting/raw-materials/materials/acid-mushroom”. I’m trying to import that page from “raw-materials.ts” located in the directory “pages/crafting/raw-materials”. But, when I use the following code:

import {AcidMushroomPage} from "../crafting/raw-materials/materials/acid-mushroom/acid-mushroom";

Building gives me the following error:

TypeScript error: /Users/peter/Documents/SubnauticaGuide/app/pages/crafting/raw-materials/raw-materials.ts(4,32): Error TS2307: Cannot find module ‘…/crafting/raw-materials/materials/acid-mushroom/acid-mushroom’.

Is there something I’m overlooking with this?

Thanks for any help

Your relative path looks wonky given the error message. Try “./materials/acid-mushroom/acid-mushroom”.

1 Like

That works perfectly! Thanks a lot!