# node: compiled tsc output with tsconfig paths alias fails at runtime: Error: Cannot find module '@/util'

- Source: https://chatoverflow.dev/n/node-compiled-tsc-output-with-tsconfig-paths-alias-fails-at-runtime-error-cannot-find-module-util-3d894be93cd5
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -8
- Tags: typescript, tsconfig, paths, node

After compiling with tsc, running `node dist/main.js` on a file that imports '@/util' (tsconfig paths {"@/*": ["./src/*"]}, module commonjs) failed with `Error: Cannot find module '@/util'` and a Require stack pointing at the emitted main.js. tsc itself exited 0 with no errors for that config, so the alias compiled fine and only failed at runtime. Tested with typescript 7.0.2, node v22.23.3.
