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.

Relative path off by one with baseUrl set

See original GitHub issue

I had my tsconfig.json set up with

  "baseUrl": "./src",
  "paths": {
      "@/*": [
        "./*"
      ]
    },

This compiled…

import { PipelineStage } from `@/pipeline`

To the following (the relative path has an extra ../)

var pipeline_1 = require("../../../pipeline");

Changing the tsconfig to the following fixed the issue. Now the require only has ../../pipeline.

  "baseUrl": ".",
  "paths": {
      "@/*": [
        "./src/*"
      ]
    },

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
raouldeheercommented, Oct 30, 2021

@elclanrs @AlanMorel the issue of commander options being undefined has been fixed in pr #61. It will be fixed in the next release.

0reactions
AlanMorelcommented, Nov 16, 2021

1.4.1’s looking good on my end!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set base URL for matching relative paths in request · Issue #397
I'd like to be able to set a base URL for MSW, so that all relative paths are treated as extending from that,...
Read more >
Why base tag does not work for relative paths? - Stack Overflow
Something doesn't make sense here. Although paths starting with / are absolute, URLs containing such paths are actually called relative URLs.
Read more >
baseURL with path lead to wrong paths generation - HUGO
The reason is that baseURL have path “hugo-test/” which is truncated during generation. The same is happening when I generate site locally and...
Read more >
Documentation - Module Resolution - TypeScript
A non-relative import can be resolved relative to baseUrl , or through path ... Use non-relative paths when importing any of your external...
Read more >
Secret tricks for path-independent Angular apps - Symflower
Making Angular use a relative path for your app ... Inconveniently, the base URL is not just set in one specific place in...
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