-
Notifications
You must be signed in to change notification settings - Fork 14
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
not working on compiling ts to js #20
Comments
Could you provide a sample repo where the problem occurs? I think I dealt with a similar issue but would need to see what was the problem in your case. |
@m0hdasif
package.json:
You'll want to prefix the
Personally, I'd just alias the root:
package.json:
|
Thanks @khuezy for suggestion, I made it work by making following tweaks in expressJs application: tsconfig.json: "rootDir": "src",
"baseUrl": ".",
"paths": {
"@utils/*": ["src/utils/*"]
} package.json:
"scripts": {
"preinstall": "which link-module-alias && link-module-alias clean || echo",
"postinstall": "link-module-alias",
"build": "rm -rf build/ && tsc && link-module-alias",
"start": "node build/src/index.js"
},
"_moduleAliases": {
"@utils": "build/src/utils"
} Hi @Rush, |
Same issue ! |
@Rush,
I really liked your package, but I ran into issue while I was implementing the links in typescript.
It is working fine in typescript but got the following issue on compiling the project into JavaScript.
Error: Cannot find module '@utils/httpService
Please tell me, how can I resolve the issue?
The text was updated successfully, but these errors were encountered: