Many problem in prisma-examples/accelerate/svelte-starter/
TLDR:
- Problem when install - You have to manually fetch $ node_modules/openflights-cached/bin/fetch.js
- In migration / seed - you may have to add binaryTargets = ["native", "rhel-openssl-1.0.x"] in prisma/schema.schema
- 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"] }
Hi there, could you please try installing the example using our try-prisma CLI and let me know if things are still broken?
npx try-prisma@latest --template accelerate/svelte-starter
Hi there, could you please try installing the example using our
try-prismaCLI and let me know if things are still broken?
npx try-prisma@latest --template accelerate/svelte-starter
Zubair@DESKTOP-V22N2L0 MINGW64 ~/Desktop/Test/try-prisma-gh
$ pnpm run dev
> [email protected] dev C:\Users\Zubair\Desktop\Test\try-prisma-gh
> vite dev
VITE v6.1.1 ready in 861 ms
β Local: http://localhost:5173/
β Network: use --host to expose
β press h + enter to show help
X [ERROR] Could not resolve require("./dist/icaos/**/*/**/*.json")
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/index.js:10:63:
10 β const requireicao = (id) => self.icaos.includes(id) && require(`./dist/icaos/${id.substr(0,1)}/${id}.json`);
β΅ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/iata2icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata2icao.js:1:25:
1 β module.exports = require("./dist/iata2icao.json");
β΅ ~~~~~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/iata.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata.js:1:25:
1 β module.exports = require("./dist/iata.json");
β΅ ~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/array.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/array.js:1:25:
1 β module.exports = require("./dist/array.json");
β΅ ~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/icaos.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icaos.js:1:25:
1 β module.exports = require("./dist/icaos.json");
β΅ ~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icao.js:1:25:
1 β module.exports = require("./dist/icao.json");
β΅ ~~~~~~~~~~~~~~~~~~
10:26:02 PM [vite] (client) error while updating dependencies:
Error: Build failed with 6 errors:
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/array.js:1:25: ERROR: Could not resolve "./dist/array.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata.js:1:25: ERROR: Could not resolve "./dist/iata.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata2icao.js:1:25: ERROR: Could not resolve "./dist/iata2icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icao.js:1:25: ERROR: Could not resolve "./dist/icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icaos.js:1:25: ERROR: Could not resolve "./dist/icaos.json"
...
at failureErrorWithLog (C:\Users\Zubair\Desktop\Test\try-prisma-gh\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1476:15)
at C:\Users\Zubair\Desktop\Test\try-prisma-gh\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:945:25
at C:\Users\Zubair\Desktop\Test\try-prisma-gh\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1354:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
X [ERROR] Could not resolve require("./dist/icaos/**/*/**/*.json")
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/index.js:10:63:
10 β const requireicao = (id) => self.icaos.includes(id) && require(`./dist/icaos/${id.substr(0,1)}/${id}.json`);
β΅ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/icaos.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icaos.js:1:25:
1 β module.exports = require("./dist/icaos.json");
β΅ ~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/array.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/array.js:1:25:
1 β module.exports = require("./dist/array.json");
β΅ ~~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/iata.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata.js:1:25:
1 β module.exports = require("./dist/iata.json");
β΅ ~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icao.js:1:25:
1 β module.exports = require("./dist/icao.json");
β΅ ~~~~~~~~~~~~~~~~~~
X [ERROR] Could not resolve "./dist/iata2icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata2icao.js:1:25:
1 β module.exports = require("./dist/iata2icao.json");
β΅ ~~~~~~~~~~~~~~~~~~~~~~~
10:26:03 PM [vite] (client) error while updating dependencies:
Error: Build failed with 6 errors:
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/array.js:1:25: ERROR: Could not resolve "./dist/array.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata.js:1:25: ERROR: Could not resolve "./dist/iata.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/iata2icao.js:1:25: ERROR: Could not resolve "./dist/iata2icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icao.js:1:25: ERROR: Could not resolve "./dist/icao.json"
node_modules/.pnpm/[email protected]/node_modules/openflights-cached/icaos.js:1:25: ERROR: Could not resolve "./dist/icaos.json"
...
at failureErrorWithLog (C:\Users\Zubair\Desktop\Test\try-prisma-gh\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1476:15)
at C:\Users\Zubair\Desktop\Test\try-prisma-gh\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:945:25
at C:\Users\Zubair\Desktop\Test\try-prisma-gh\node_modules\.pnpm\[email protected]\node_modules\esbuild\lib\main.js:1354:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) (x2)
I'm not able to replicate this with npm or pnpm. What versions of those packages do you have?
I'm not able to replicate this with
npmorpnpm. What versions of those packages do you have?
pnpm --v 10.4.0 (and also tried with 9.4 something the day of creating this issue )
npm --v 10.9.2
please tell 3-5 person to run
npx try-prisma@latest --template accelerate/svelte-starter
and follow the https://github.com/prisma/prisma-examples/tree/latest/accelerate/svelte-starter I hope - at least some of them get one/some of my 3 problems.
If you wouldn't mind, please run pnpm approve-builds, approve all options, and then run pnpm run dev again
pnpm approve-builds
Zubair@DESKTOP-V22N2L0 MINGW64 ~/Desktop/Test/try-prisma-gh
$ pnpm approve-builds
β Choose which packages to build (Press <space> to select, <a> to toggle all, <i> to invert selection) Β· @prisma/client, @prisma/engines, esbuild, openflights-cached, prisma
β The next packages will now be built: @prisma/client, @prisma/engines, esbuild, openflights-cached, prisma.
Do you approve? (y/N) Β· true
node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script...
node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 122ms script, failed in 32ms
.../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 32ms at C:\Users\Zubair\Desktop\Test\try-prisma-gh\node_modules\.pnpm\[email protected]\node_modules\openflights-cached
node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 127ms
node_modules/.pnpm/@[email protected]/node_modules/@prisma/engines: Running postinstall script...
βELIFECYCLEβ Command failed with exit code 1.
Are you seeing this issue in a standard Windows installation? Are you using WSL?
Are you seeing this issue in a standard Windows installation? Are you using WSL?
windows 11 home. (not WSL) I already usage many examples of Supabase, Cloudflare Workes, Clerk, Kinde, T3 etc. no problem occurred.
Confirmed that this is an issue with Windows.