Typescript cannot import files using aliases

problem description

when I refer to a file using an alias, the console outputs index.ts:1:16-error TS2307: Cannot find module"@ / test.js".

related codes

/ project/test.js

{
  "compilerOptions": {
    "baseUrl": ".",
    "rootDir": ".",
    "paths": {
      "@/*": ["project/*"]
    },
    "module": "esnext",
    "target": "es6",
    "lib": ["esnext", "dom"],
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "resolveJsonModule": true,
    "pretty": true
  },
  "exclude": ["node_modules", "dist"]
}

/ index.js

import fn from "@/test";
fn();
Jul.13,2022


    "paths": {
      "@/*": ["./project/*"]
    },
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37119-4d701.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37119-4d701.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?