question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support path resolvers from tsconfig

See original GitHub issue

Hi,

in my tsconfig file i have paths set up like this

"compilerOptions": {
		...
		"paths": {
			"$lib/*": ["src/lib/*"]
		}
	},

If I import a module for testing (using loadr, tsm and uvu) the resolution fails as soon as the module/file that I import has a reference to $lib with the following error: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '$lib' imported from /path/to/lib/utils.ts

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:9
  • Comments:20 (4 by maintainers)

github_iconTop GitHub Comments

21reactions
lukeedcommented, Oct 8, 2021

Oh yeah, oops! I’ll add this

8reactions
RoenLiecommented, Mar 20, 2022

what is the status on this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Module Resolution - TypeScript
The TypeScript compiler supports the declaration of such mappings using paths property in tsconfig.json files. Here is an example for how to specify...
Read more >
tsconfig-paths - npm
Use this to load modules whose location is specified in the paths section of tsconfig.json or jsconfig.json . Both loading at run-time and...
Read more >
typescript 4.4.4: tsconfig paths not resolving as expected
use a bundler, such as webpack, and configure its own path maps · use a build time tool, such as tspath, to rewrite...
Read more >
Advanced Features: Absolute Imports and Module Path Aliases
Next.js automatically supports the tsconfig.json and jsconfig.json "paths" and "baseUrl" options since Next.js 9.4. Note: jsconfig.json can be used when you ...
Read more >
How to configure and resolve path alias with a Typescript Project
We can do this by adding the following lines to our tsconfig.json file. ... make sure that you are adding the baseUrl and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found