-1

i have created one components folder which is outside the src .Now i need to access that components inside the src . suggest steps to do that(instead of moving components folder inside src)And the other solutions didn't helped me to solve this

and the error is

Compiled with problems:X

ERROR in ./src/App.tsx 27:0-198

Module not found: Error: You attempted to import ../almLib/almLib 
which falls outside of the project src/ directory. Relative i 
imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from 
project's node_modules/.

1 Answers1

0

You cannot do this when using Create React App. There are some libraries that allow you to override this configuration but the best solution is to move your folder inside /src. If you still want to have this folder structure then you can follow this thread that includes many alternatives.

Toni Bardina Comas
  • 1,670
  • 1
  • 5
  • 15