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

224
Views
jsconfig.json paths not working when importing

Error: Cannot find package '@tables/db_question.js' imported from... `src\routes\question_route.js This is my file directory:

root
|── src
|    └── database
|    |       └── tables
|    |              └── db_question.js
|    |── routes
|          └── question_route.js
|── node_modules

db_question.js

export function post() {
    
}

question_route.js

import express from "express";
const questionRouter = express.Router();
// import * as questionDatabase from "../database/tables/db_question.js";
import * as questionDatabase from "@tables/db_question.js"; // this doesn't work

// POST /question
questionRouter.post('/', (req, res, next) => {
    res.send("works")
})

export default questionRouter;

So I'm importing from src/database/tables/db_question.js into src/routes/question_route.js There doesn't seem to be much jsconfig.json answers on stackoverflow or on the web...

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!