Error using alias path #50
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Hi,
thanks a lot for this template, very good work.
I try to use alias path in the project, I add this in tsconfig.json under compilerOptions:
"paths": { "~/*": ["./src/*"], },
but when run
yarn dev
I get this error:[0]
[1] node:internal/errors:490
[1] ErrorCaptureStackTrace(err);
[1] ^
[1]
[1] Error [ERR_MODULE_NOT_FOUND]: Cannot find package '~' imported from /stuff/dist/index.js
[1] at new NodeError (node:internal/errors:399:5)
[1] at packageResolve (node:internal/modules/esm/resolve:889:9)
[1] at moduleResolve (node:internal/modules/esm/resolve:938:20)
[1] at defaultResolve (node:internal/modules/esm/resolve:1153:11)
[1] at nextResolve (node:internal/modules/esm/loader:163:28)
[1] at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
[1] at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
[1] at ModuleWrap. (node:internal/modules/esm/module_job:77:40)
[1] at link (node:internal/modules/esm/module_job:76:36) {
[1] code: 'ERR_MODULE_NOT_FOUND'
[1] }
I have tried several solutions but none have solved the problem. could anyone help me.
thank you very much
The text was updated successfully, but these errors were encountered: