Can't import from absolute paths using Typescript and NodeJS

61
September 20, 2021, at 11:10 AM

I've tried many things to solve this issue. I'm trying to import from absolute paths defined on my tsconfig.json

on a file on my project I'm trying to use import { UserModel } from "model/User";

And on my tsconfig.json I have

{
....
"baseUrl": "src", 
"paths": {
  "model/*": ["model/*"]`
  }
....
}

I've tried changing the baseUrl to ".", "./" and changing the paths as well, but I'm always getting the same error:

Error: Cannot find module 'model/User'

I have also tried to add an index.ts file to the model folder and export models from there, but still.. same issue. Any help is appreciated.

READ ALSO
How to store data from user into Array or ArrayList? [closed]

How to store data from user into Array or ArrayList? [closed]

Want to improve this question? Add details and clarify the problem by editing this post

70
not rendering content until needed

not rendering content until needed

I am trying to make my webpage load quicker and be more responsiveI am loading in upto 4k images that a user can scroll down through, apply filters to, and sort

25
RecyclerView Filter is not filtering (Kotlin)

RecyclerView Filter is not filtering (Kotlin)

I started the debugger and my breakpoints show that on the first startup the dataset is being transmitted as the adapter is being initialized, but as soon as I call the filter it doesn't have any data to work with and my recyclerview just stays as it was before

38
Pulling a docker image to client site [closed]

Pulling a docker image to client site [closed]

Want to improve this question? Update the question so it focuses on one problem only by editing this post

71