Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using alias path #50

Open
dlato97 opened this issue Aug 21, 2023 · 4 comments
Open

Error using alias path #50

dlato97 opened this issue Aug 21, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@dlato97
Copy link

dlato97 commented Aug 21, 2023

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

@saisilinus
Copy link
Owner

Hey,

I've never faced this error before

@saisilinus
Copy link
Owner

Have you used the path anywhere in your code?

@dlato97
Copy link
Author

dlato97 commented Aug 21, 2023

I used it in many places but not everywhere

@kiennt2
Copy link

kiennt2 commented Sep 16, 2023

+ 1 i have same issue with fresh install

@saisilinus saisilinus added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants