-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
MatrixAI/Polykey
#40Labels
bugSomething isn't workingSomething isn't working
Description
Note: this issue is just for documentation and has a solution already:
The issue in question is an error that occurs when using imports that use the @ symbol to denote the module (e.g. import PolyKey from @polykey/PolyKey.ts). It turns out ts-node doesn't like this and throws an error. There is a whole issue about tsconfig.json/paths not working with ts-node. The solution is to use tsconfig-paths and then suffix all your calls with ts-node -r tsconfig-paths/register <file>. One can do this with a handy alias: alias ts-node='ts-node -r tsconfig-paths/register'.
For webpack, there is also a module for this: https://github.com/dividab/tsconfig-paths-webpack-plugin
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working