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 uses old filename casing

See original GitHub issue

VS Code version: Code - Insiders 1.26.0-insider (c86cab2211d6dce686e5c89934d915b1e020ba9e, 2018-08-02T05:12:16.245Z) OS version: Darwin x64 17.7.0

Verifying #50505

foo.ts:

baz();

bar.ts:

export function baz() {
}
  • Run ‘import from bar.ts’ code action in foo.ts
  • Undo
  • Rename bar.ts to Bar.ts
  • Run ‘import from bar.ts’ code action again -> Import uses lowercase ‘bar’ instead of ‘Bar’

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

1reaction
mattwilson1024commented, Nov 19, 2021

I’m not entirely sure if this is a valid workaround or if it’s a red herring so sorry if it is, but I just had the same issue after accidentally renaming a svelte file from camel cased to pascal cased. I closed VSCode, ran yarn cache clean and now it seems to be correctly auto-importing the new name.

0reactions
WimSuenenscommented, Nov 26, 2021

I’m not entirely sure if this is a valid workaround or if it’s a red herring so sorry if it is, but I just had the same issue after accidentally renaming a svelte file from camel cased to pascal cased. I closed VSCode, ran yarn cache clean and now it seems to be correctly auto-importing the new name.

Here as well. npm cache clean solves the issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing the capitalization of a filename causes auto-import ...
Steps to Reproduce: Use auto-import in a file named "file.ts"; Change the name of "file.ts" to "File.ts"; Try to auto-import again and see...
Read more >
VSCode emmet issue after changing case for file name
I am new to using VSCode and emmet for expanding filenames, etc. ... it imports the old filename myfile.jsx (without the updated casing)....
Read more >
Solved: Filename importing problem - SAS Communities
Solved: Hi SAS Users, Today I ran a macro, %macro ImportAndTranspose( File= , cur= , outf= , StartSheet= , EndSheet= ); I have...
Read more >
File path formats on Windows systems | Microsoft Learn
This topic discusses the formats for file paths that you can use on ... Both specify the optional volume specifier ( C: in...
Read more >
fnmatch — Unix filename pattern matching — Python 3.11.1 ...
... are documented in the re module). The special characters used in shell-style wildcards are: ... import fnmatch import os for file 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