Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Dprint in JS project doens't work #97

Open
douglasg14b opened this issue Sep 7, 2024 · 4 comments
Open

Local Dprint in JS project doens't work #97

douglasg14b opened this issue Sep 7, 2024 · 4 comments

Comments

@douglasg14b
Copy link

douglasg14b commented Sep 7, 2024

Version: 0.47.2


Dprint no longer appears to work in my project in VSCode, I do not want to globally install it, and expect it work work as part of the project itself (And expect it to work for anyone else that pulls the project). This does not seem to be the case :/

It's installed in the repo, but the extension does not pick it up. Similarly there is a dprint.json at the root of the repo.

[ERROR] Problem launching dprint. '"dprint"' is not recognized as an internal or external command,
operable program or batch file.

[ERROR] Error initializing dprint. Ensure it is globally installed on the path (see https://dprint.dev/install) or specify a "dprint.path" setting to the executable.
[INFO] Configuration file not found.
[INFO] Extension active!

@dsherret dsherret transferred this issue from dprint/dprint Sep 8, 2024
@dsherret
Copy link
Member

dsherret commented Sep 8, 2024

What version of the extension are you using? What operating system/architecture do you have? Does your node_modules folder have a dprint executable in it? What happens if you run npx dprint -v? After running that if you restart the extension does it work?

@douglasg14b
Copy link
Author

douglasg14b commented Sep 8, 2024

  1. Extenstion: v0.16.3
  2. node_modules:
    image
    image
  3. npx dprint -v: dprint 0.47.2
  4. After running npx dprint behavior continues after an editor restart

@dsherret
Copy link
Member

dsherret commented Sep 8, 2024

Does it work with version 0.16.2? Do you think #92 broke it? Specifically https://github.com/dprint/dprint-vscode/pull/92/files#diff-cadc1bd035f997fef1cdf057f2016ed0cfeb8b602903fceacca2e3d2363b8c67R20

Are you on aarch64 windows or x86-64?

@douglasg14b
Copy link
Author

douglasg14b commented Sep 8, 2024

If I downgrade to 0.16.2 the problem is resolved yep.

I'm on Windows, x86 architecture.

I agree with the reasoning for the change, however I assume there is a bug in copying or validating that it was copied. Probably needs some method for validating that the copying operation occurred 🤔

At first glance the code to copy seems pretty standard, perhaps the existing check is hitting an edge case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants