language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Error trying to run dev environment while Prisma extension is enabled

Open kelvinsanchez15 opened this issue 4 years ago โ€ข 12 comments

Bug description

When I try to run my local dev environment or create a production build for my NextJS application npm throws an exception: [ERROR: ENOTEMPY: directory not empty]

Error screenshots

  • Trying to run dev environment image

  • Trying to make a production build image

Workaround

Disable prisma extension => Reload VSCode => Run dev/build

Environment & setup

  • OS: Windows 10
  • Prisma extensiรณn: v2.10.2
  • Prisma CLI: v2.10.2
  • Prisma Client: v2.10.2

kelvinsanchez15 avatar Nov 09 '20 21:11 kelvinsanchez15

Hey @kelvinsanchez15!

In order to get to the ground of this bug, can please try to install the latest Prisma extension (2.11.0), and check if this issue still occurs? From what I see, the extension might not be the issue here imo, but to double check, it'd be great to specifically test that once more.

Please let us know if you can reproduce this with the Prisma extension with 2.11.0. ๐Ÿ™

carmenberndt avatar Nov 12 '20 12:11 carmenberndt

Hi @carmenberndt I tried with version 2.11 and the bug persists. Something that I realized after several tests is that one of the conditions for it to occur is to have files open in VS Code. If everything is closed at the time of enabling the extension (or restarting VS Code) the bug does not occur. The problem is if for whatever reason you need to restart the dev environment later the same error will be given.

kelvinsanchez15 avatar Nov 13 '20 00:11 kelvinsanchez15

Do you mean having any file open? Or does it only happen when having .prisma files open? Still seems like an unrelated bug to the extension to me tbh. The extension does not add or remove any directories/files as mentioned in the error message you posted above.

carmenberndt avatar Nov 19 '20 12:11 carmenberndt

I seem to be having this issue as well. The exact same error. If I close VS code and re-open, it does nothing. If I disable the extension, then close and re-open with extension disabled, I have no issues anymore. I'm not sure what the issue is, maybe the extension is conflicting with another extension?

I've tried closing prisma files and running again but the issue still persists. Tried both 2.12.1 and 2.11.1 with the same issue. No problems without the extension enabled.

MidnightPenguin avatar Dec 02 '20 21:12 MidnightPenguin

same issue, there is a solution?

muhrusdi avatar Jan 18 '21 15:01 muhrusdi

This sounds like it only happens on Windows, are you all using Windows? @MidnightPenguin @muhrusdi ?

Jolg42 avatar Feb 17 '21 13:02 Jolg42

yes

muhrusdi avatar Feb 17 '21 14:02 muhrusdi

when i want to install a new package or run dev, i disabled this extension

muhrusdi avatar Feb 17 '21 14:02 muhrusdi

That sounds bad ๐Ÿ™ˆ

Jolg42 avatar Feb 17 '21 14:02 Jolg42

exactly the same issue, extension version v2.27.0 | windows 10 yarn next dev works just fine when the extension is disabled also works fine after closing all files and reloading vscode

uwuLegacy avatar Jul 16 '21 17:07 uwuLegacy

This is likely fixed by https://github.com/prisma/language-tools/pull/898

If someone here had the problem and can try the latest version and confirm that would be amazing!

Jolg42 avatar Nov 16 '21 16:11 Jolg42

Since version 3.8.0 of the Prisma VS Code extension released yesterday there is now a way to disable the File Watcher.

It's implemented as a (default = true) boolean in the settings Screen Shot 2021-12-21 at 13 04 46 Screen Shot 2021-12-21 at 13 04 14

And can be enabled/disabled from the command palette UI like this Screen Shot 2021-12-21 at 13 03 51

Could you check

  1. That your problem still exists with version 3.8.0 or newer
  2. Run the Prisma: Disable the File Watcher functionality for Prisma Client command
  3. Did that solve the problem?
    • If no, try to reload VS Code.
    • If yes please let us know, it will be helpful for us.

Jolg42 avatar Jan 12 '22 13:01 Jolg42

Hey, peeps, given the age and lack of activity here, I'm going to assume that this is no longer an issue, but please feel free to open a new issue if something new pops up! ๐Ÿš€

Druue avatar Dec 09 '22 11:12 Druue

Note: we have a new file watcher since 4.4.0 https://github.com/prisma/language-tools/pull/1243

Jolg42 avatar Dec 09 '22 13:12 Jolg42