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'
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'
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.
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.
This happens to me every time I open the tool. Do I need to rename that file every time?
@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
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
yea this basically makes it unusable on windows out of the box
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
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.
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
Hope it helps anyone!
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.
- Open task manager close the node runtime.
- Delete "query_engine-windows.dll.node".
- Start Ai toolkit with the bat file agen.