prettier-vscode icon indicating copy to clipboard operation
prettier-vscode copied to clipboard

not working on network drive

Open brutcha opened this issue 9 years ago • 8 comments

Formatting file located on network drive does nothing. There is no report in prettier output, and dev tools throws error:

UNKNOWN: unknown error, open '\\192.168.56.101\package.json\'

Prettier works fine on new file in same workspace, before save. Repo seems ok, as I tried it on windows machine. Problem is on my dev server runing in vBox - Host: Win 10; Guest: arch with samba; connected via host-only-network.

What i see as possible workaround is disable looking for local module of prettier, but it should work, eslint plugin have no problem in my setup.

brutcha avatar Sep 13 '17 11:09 brutcha

I think it comes from https://github.com/prettier/prettier-vscode/blob/6a3c76e42dc20fa0068d9041eb2449e7c9366762/src/requirePkg.ts#L13-L25

This is where we read package.json. Could you try to debug it?

CiGit avatar Sep 18 '17 09:09 CiGit

I debugged it a little and it don't reach findPkg at all.

Error is throwed during resolvingConfig. https://github.com/prettier/prettier-vscode/blob/9cff012c64e3fc9983d8cc1fdce9756b2fa8ed16/src/PrettierEditProvider.ts#L103

When trying to find configuration file, it wont stop when hit "\\192.168.56.101\brutcha" folder and try to read "\\192.168.56.101\" which is shared folders directory. Becouse of stopDir is "C:\Users\brutcha".

brutcha avatar Sep 19 '17 11:09 brutcha

This is in prettier. @azz ? :smiling_imp: And I suppose in cosmiconfig.

CiGit avatar Sep 19 '17 14:09 CiGit

stopDir is cosmiconfig, yeah.

azz avatar Sep 19 '17 23:09 azz

@brutcha Do you have your commands being sent to a MinGW or Cygwin shell, or is it PowerShell/CMD.exe?

azz avatar Oct 03 '17 12:10 azz

@azz not sure, i think powershell, but do not know how to find out which shell i use in vscode

brutcha avatar Oct 03 '17 13:10 brutcha

Closing due to inactively and age. Please reopen if still needed.

ntotten avatar Oct 22 '19 19:10 ntotten

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Apr 12 '20 19:04 github-actions[bot]