0

To begin, I've looked up various similar posts which have not solved my issue. I have tried using rescripts and other methods to no avail. I also am not able to move this file from it's original location.

I am in the process of building a create-react-app that utilizes an API for application data. The API file that I am using is named api.js and is outside of the src folder where my react application lives. When I try to import this module I receive an error saying,

"Module not found: You attempted to import ../api which falls outside of the project src/ directory. Relative imports outside of src/ are not supported."

Here is the folder structure that I am working with:

- react-jobly 
  - backend 
  - jobly
    - src 
      - Companies.js 
  - api.js
azaria.dee
  • 83
  • 8

0 Answers0