ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

Error: EPERM: operation not permitted, rename 'E:\Ai\ai-toolkit\ui\node_modules\.prisma\client\query_engine-windows.dll.node.tmp22200' -> 'E:\Ai\ai-toolkit\ui\node_modules\.prisma\client\query_engine-windows.dll.node'

Open wzgrx opened this issue 1 year ago • 9 comments

note: This error originates from a subprocess, and is likely not a problem with pip. (venv) PS E:\Ai\ai-toolkit> cd ui (venv) PS E:\Ai\ai-toolkit\ui> npm run build_and_start

[email protected] build_and_start npm install && npm run update_db && npm run build && npm run start

up to date, audited 445 packages in 3s

60 packages are looking for funding run npm fund for details

4 vulnerabilities (1 low, 2 high, 1 critical)

To address issues that do not require attention, run: npm audit fix

To address all issues, run: npm audit fix --force

Run npm audit for details.

[email protected] update_db npx prisma generate && npx prisma db push

Prisma schema loaded from prisma\schema.prisma Error: EPERM: operation not permitted, rename 'E:\Ai\ai-toolkit\ui\node_modules.prisma\client\query_engine-windows.dll.node.tmp43516' -> 'E:\Ai\ai-toolkit\ui\node_modules.prisma\client\query_engine-windows.dll.node'

wzgrx avatar Jun 29 '25 05:06 wzgrx

Go into the quoted directory and rename query_engine-windows.dll.node to something like query_engine-windows.dll_old.node and run again. It creates a temp version of this file and try's to overwrite the original but has permissions problems.

siejona-ws avatar Aug 07 '25 09:08 siejona-ws

G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui>python -m venv venv

G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui> G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui>venv\Scripts\activate

(venv) G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui> (venv) G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui>cd ui The system cannot find the path specified.

(venv) G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui> (venv) G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui>npm run build_and_start

[email protected] build_and_start npm install && npm run update_db && npm run build && npm run start

up to date, audited 473 packages in 1s

79 packages are looking for funding run npm fund for details

5 vulnerabilities (1 low, 2 high, 2 critical)

To address issues that do not require attention, run: npm audit fix

To address all issues, run: npm audit fix --force

Run npm audit for details.

[email protected] update_db npx prisma generate && npx prisma db push

Prisma schema loaded from prisma\schema.prisma Error: EPERM: operation not permitted, rename 'G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui\node_modules.prisma\client\query_engine-windows.dll.node.tmp44088' -> 'G:\AI TOOLKIT BY OSTRIS\ai-toolkit\ui\node_modules.prisma\client\query_engine-windows.dll.node'

even am getting the same problem. I did what you recommended, but no go.

mishrasiddharth08 avatar Aug 12 '25 12:08 mishrasiddharth08

This happens to me every time I open the tool. Do I need to rename that file every time?

virtamouse avatar Sep 09 '25 00:09 virtamouse

@shyt47 @jaretburkett it was happening to me exactly the same!! why is this happens ? because everytime we close it we have to delete that file again !!! dont exist a fix for this? thks

merecesarchviz avatar Oct 10 '25 07:10 merecesarchviz

the simple solution i found it was to create a bat to run it:

echo on

C:\AI\ai-toolkit\ui\node_modules.prisma\client\query_engine-windows.dll.node> del “query_engine-windows.dll.node”

call .\venv\Scripts\activate.bat cd ui npm run build_and_start

merecesarchviz avatar Oct 10 '25 07:10 merecesarchviz

yea this basically makes it unusable on windows out of the box

marduk191 avatar Nov 29 '25 21:11 marduk191

I think it happens when closing the cmd with the close button, rather than stopping the procedure with Ctrl + C.

If you didn't do that.

Go to task manager and close all the NodeJS processes and then open ai-toolkit again

That fixed it for me

JuanBerta avatar Dec 04 '25 05:12 JuanBerta

Followed https://github.com/ostris/ai-toolkit/issues/311#issuecomment-3388677145 steps and worked for me. i just make a few changes to the .bat so i can move the whole folder and still work while the ai-toolkit folder is next to it.

How is works? The .bat first delete the query_engine-windows.dll.node and then run build_and_start. for me works every time. just remember Ctrl + C to close the process when u done, to prevent leaving any Node.js process running.

Image

Create a text file, then rename to run.bat, edit and put this code inside

@echo off
cd /d "%~dp0"

set "TARGET_FILE=ai-toolkit\ui\node_modules\.prisma\client\query_engine-windows.dll.node"

if exist "%TARGET_FILE%" (
    del "%TARGET_FILE%"
    echo query_engine-windows.dll.node successfully deleted.
) else (
    echo The file does not exist or has already been deleted..
)

call ai-toolkit\venv\Scripts\activate.bat

cd ai-toolkit\ui

call npm run build_and_start

echo.
echo The process is complete. Press any key to exit.
pause
Image

Hope it helps anyone!

crialero avatar Dec 04 '25 15:12 crialero

I think it happens when closing the cmd with the close button, rather than stopping the procedure with Ctrl + C.

If you didn't do that.

Go to task manager and close all the NodeJS processes and then open ai-toolkit again

That fixed it for me

This dose the trick for me.

  1. Open task manager close the node runtime.
  2. Delete "query_engine-windows.dll.node".
  3. Start Ai toolkit with the bat file agen.

Reno0vacio avatar Dec 31 '25 09:12 Reno0vacio