Home > Back-end >  Import Error: Module not found: Error: Can't resolve
Import Error: Module not found: Error: Can't resolve

Time:10-21

I'm getting an import error that I can't understand. queries.js is located inside of my src folder. I'm trying to import it into one of my files that sits inside of the pages folder. I have two periods to so that it looks outside of pages back into the src folder. I was able to resolve this issue by copying the file into it's own folder called graphql. When I import from ../graphql/queries.js; there is no error anymore. In the past when I got these errors it is usually just a typo but I can't find any here. I'm just learning how to use AWS Amplify and AppSynch and I'm getting this error setting up a test App.

I appreciate any help so that I can better understand the problem here. Thank you for your time!

Error:

ERROR in ./src/pages/Edi.js 12:0-44

Module not found: Error: Can't resolve '../queries.js' in 'C:\Users\nmaka\Documents\Meraki_Home\meraki_app\meraki-app\src\pages

enter image description here

CodePudding user response:

Move your queries.js inside the src directory because it's not there right now

  • Related