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

Many problem in prisma-examples/accelerate/svelte-starter/ #7418

Open
2u841r opened this issue Jan 20, 2025 · 0 comments
Open

Many problem in prisma-examples/accelerate/svelte-starter/ #7418

2u841r opened this issue Jan 20, 2025 · 0 comments

Comments

@2u841r
Copy link

2u841r commented Jan 20, 2025

TLDR:

  1. Problem when install - You have to manually fetch $ node_modules/openflights-cached/bin/fetch.js
  2. In migration / seed - you may have to add binaryTargets = ["native", "rhel-openssl-1.0.x"] in prisma/schema.schema
  3. Some of NPM, PNPM, Yarn and some code editor- VSCode / Cursor may behave differently.

after cloning prisma-examples/accelerate/svelte-starter/
I did pnpm i
Zubair@DESKTOP-V22N2L0 MINGW64 ~/Desktop/lasttry
$ pnpm i

Packages: +184
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 250, reused 183, downloaded 1, added 184, done
node_modules/.pnpm/[email protected]/node_modules/openflights-cached: Running postinstall script.node_modules/.pnpm/[email protected]/node_modules/openflights-cached: Running postinstall script, failed in 25msnpm/@[email protected]/node_modules/@prisma/engines: Running postinstall script...
.../node_modules/openflights-cached postinstall$ bin/fetch.js
│ 'bin' is not recognized as an internal or external command,
│ operable program or batch file.
└─ Failed in 25ms at C:\Users\Zubair\Desktop\lasttry\node_modules\.pnpm\[email protected]\node_modules\openflights-cached
node_modules/.pnpm/@[email protected]/node_modules/@prisma/engines: Running postinstall script...    
 ELIFECYCLE  Command failed with exit code 1.

then I deleted node_modules and npm i

Zubair@DESKTOP-V22N2L0 MINGW64 ~/Desktop/lasttry
$ npm i

npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     '\\\\?\\C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\esbuild',
npm warn cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Zubair\Desktop\lasttry\node_modules\esbuild'] {
npm warn cleanup       errno: -4082,
npm warn cleanup       code: 'EBUSY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\esbuild'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     'C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\esbuild',
npm warn cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Zubair\Desktop\lasttry\node_modules\esbuild'] {
npm warn cleanup       errno: -4082,
npm warn cleanup       code: 'EBUSY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\esbuild'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\?\\C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\vite',
npm warn cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Zubair\Desktop\lasttry\node_modules\vite\node_modules\esbuild'] {
npm warn cleanup       errno: -4082,
npm warn cleanup       code: 'EBUSY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\vite\\node_modules\\esbuild'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     'C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\vite',
npm warn cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Zubair\Desktop\lasttry\node_modules\vite\node_modules\esbuild'] {
npm warn cleanup       errno: -4082,
npm warn cleanup       code: 'EBUSY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\vite\\node_modules\\esbuild'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\?\\C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\svelte',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\Zubair\Desktop\lasttry\node_modules\svelte\src\internal'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\Zubair\\Desktop\\lasttry\\node_modules\\svelte\\src\\internal'  
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error code 1
npm error path C:\Users\Zubair\Desktop\lasttry\node_modules\openflights-cached
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c bin/fetch.js
npm error 'bin' is not recognized as an internal or external command,
npm error operable program or batch file.
npm error A complete log of this run can be found in: C:\Users\Zubair\AppData\Local\npm-cache\_logs\2025-01-20T07_53_57_474Z-debug-0.log

then yarn install
then i have to custom fetch
$ node node_modules/openflights-cached/bin/fetch.js

in my vscode, this is the way. (before creating the issue).
but in cursor (yesterday), suddenly a pop up "cursor wants to open a file", I clicked on yes, then that fetch.js opened.
then I see that files path and fetch.

then In a precess- I forgot / note not taken - I got some error, (which I don't faced last time), that solved after adding following line on prisma/schema.schema generator
binaryTargets = ["native", "rhel-openssl-1.0.x"]

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}

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

1 participant