Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
Absolute imports aren't working in ReactJS

I have a ReactJS project called my-app, that was created using the Redux+TS template.

It's folder structure is like this:

node-modules
public
src/
    components/
        Controller.jsx
    App.jsx
    index.jsx
jsconfig.json
package-lock.json
package.json

App.jsx:

import React from "react";
import Controller from "components/controller";

jsonfig.json:

{
  "compilerOptions": {
    "baseUrl": "src"
  },
  "include": ["src"]
}

I'm trying to import the Controller component into my App component using absolute imports, but whenever I compile it, I get an error:

Compiled with problems:

ERROR IN ./src/App.jsx

Module not found: Can't resolve 'components/Controller' in '<container-directory>\my-app\src
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!