Skip to content

Unable to resolve module [external url] within the project or in these directories: node_modules

Im doing a project in react native

I have an object of exercises that include images and videos, everything is fine when the object was created, but when I imported into another file I get this error

undefined Unable to resolve module from /mnt/c/Users/USER/Documents/superfit/app/src/screens/Patient/Workouts/ExercisesList.ts: could not be found within the project or in these directories: node_modules

enter image description here

This is the file of the exercises

enter image description here

And this is the file where I import it, when it happens, the apps automatically crashes with the error message

enter image description here

It would be awesome if someone wcould help me!! thanks in advance



I don’t think you need require() for URL, you only need it if the image/video/file is on your local machine.

so what you need is:

export const exercises = {
  bodyWeightSquats: {
    video: " ",
    image: "",
User contributions licensed under: CC BY-SA
6 People found this is helpful