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.

`$` in pathname gets transformed and the file cannot be found anymore

See original GitHub issue

Environments:

  • Prettier Version: 2.7.1
  • Running Prettier via: CLI
  • Runtime: Node.js v16.15.1
  • Operating System: Ubuntu 20.04 (Windows 10 with WSL 2)
  • Prettier plugins (if any): none

Steps to reproduce:

Run following command npx prettier "/home/user/project/src/$state/builder-form.ts"

Expected behavior:

prettier should not transform anything between the quotes (")

Actual behavior:

prettier removes everything from the $ until the next slash / and removes it from the path. I get following error:

[error] No files matching the pattern were found: "/home/user/project/src//builder-form.ts".

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
thorn0commented, Aug 9, 2022

I did and couldn’t reproduce anything wrong, at least on Ubuntu. Macos’s shell might work slightly differently.

1reaction
ivanhofercommented, Aug 8, 2022

Also by escaping the $ sign I get the same error. npx prettier "/home/user/project/src/\$state/builder-form.ts"

[error] No files matching the pattern were found: "/home/user/project/src//builder-form.ts".

Read more comments on GitHub >

github_iconTop Results From Across the Web

Path changed in solutions file Visual Studio 2019, now can't ...
Basically, I put the whole project in another folder called App%name%with%spaces . Now I get errors that they can't find the projects.assets.
Read more >
Jest tests failed after upgrading axios to v1.1.2 · Issue #5101
Problem with Jest is that it runs code in Node, but application is built for web-clients. This is why telling Jest to transform...
Read more >
Why has my filename changed? - Microsoft Support
When saving files to your personal OneDrive, certain characters are automatically renamed by Office apps, including Word, Excel and PowerPoint.
Read more >
Download Nupkg from Orchestrator, the space(" ") in file name ...
Download nupkg from Orchestrator, unzip it, previously if folder names or file names created with space (" "), all spaces become “%20”; ...
Read more >
Excel Power Query DataSource.NotFound: File or Folder
If you get this error: DataSource.NotFound: File or Folder: We couldn't find the folder. To fix it: Update Excel Power Query File or...
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