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.

`import '.'` improperly mapped.

See original GitHub issue

Example

Before:

import { something } from '.';

After:

import { something } from 'index.js';

Something it could be transformed to:

import { something } from './index.js';

Explanation

You probably know why. But index.js refers to the root, . and index.js refers to an index file at the same level as the file. If anyone has this error, you could change the imports from . to ./index.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
raouldeheercommented, Nov 5, 2022

@KyleSmith0905 I have found the bug that was causing the issue, pr following soon. A workaround for this issue is to replace . with ./.

0reactions
KyleSmith0905commented, Sep 28, 2022

I am running the command tsc && tsc-alias --debug --project tsconfig.json.

Here is the first part of the CLI feed when running this command with both an incorrect . and correct ./index in 2 places, although it shouldn’t matter.

tsc-alias debug: Loading config file: '<path>\\tsconfig.json'
tsc-alias debug: configDir '<path>'
tsc-alias debug: loaded config (from file): {
  baseUrl: './',
  outDir: '<path>\\dist',
  paths: {
    '@actions/*': [ './actions/*', [length]: 1 ],
    '@lib/*': [ './lib/*', [length]: 1 ],
    '@pages/*': [ './pages/*', [length]: 1 ]
  },
  resolveFullPaths: true
}
tsc-alias debug: resolveFullPaths is active
tsc-alias debug: loaded project config: {
  configFile: '<path>\\tsconfig.json',
  baseUrl: './',
  outDir: '<path>\\dist',
  configDir: '<path>',
  outPath: '<path>\\dist',
  confDirParentFolderName: '<end path>',
  hasExtraModule: false,
  configDirInOutPath: null,
  relConfDirPathInOutPath: null,
  pathCache: PathCache {
    useCache: true,
    existsCache: Map(0) {},
    absoluteCache: Map(0) {}
  }
}
tsc-alias debug: loaded full config: {
  configFile: '<path>\\tsconfig.json',
  baseUrl: './',
  outDir: '<path>\\dist',
  configDir: '<path>',
  outPath: '<path>\\dist',
  confDirParentFolderName: '<end path>',
  hasExtraModule: false,
  configDirInOutPath: null,
  relConfDirPathInOutPath: null,
  pathCache: PathCache {
    useCache: true,
    existsCache: Map(0) {},
    absoluteCache: Map(0) {}
  },
  output: Output {
    verb: false,
    debug: [Function (anonymous)] { [length]: 2, [name]: '' },
    [verbose]: [Setter]
  },
  aliasTrie: TrieNode . . .
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Mapping incorrectly mapped fields
You can map these fields to the correct dimensions, or specify that they should be ignored. For example, if the import file contains...
Read more >
6 Common CSV Import Errors and How to Fix Them - Flatfile
One of the most common CSV import errors is that the file is simply too large. That can be caused by too many...
Read more >
Unexpected result when 'Record Owner' is mapped in Data ...
Unexpected result when 'Record Owner' is mapped in Data Import Wizard. ... potential occurrences of records being imported with the wrong record owner....
Read more >
How to troubleshoot import issues when using a Data ...
If resource lookup keys are renamed, removed or mapped incorrectly from the data source, the error "The import rule '<import rule name>' ...
Read more >
Solved: CSV import - Status field - Atlassian Community
I'm trying to leverage import csv feature in JIRA, which is great, but from what I can see, although "Status" is in CSV...
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