Dan Mercer
Dan Mercer3y ago

cross-device link not permitted

More of a big deal, convex@0.3.x doesn't seem to work with an encrypted home directory (at least I'm guessing that's what's causing this error for me - see thread) 😢
11 Replies
Dan Mercer
Dan MercerOP3y ago
Preparing Convex functions...
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EXDEV: cross-device link not permitted, rename '/tmp/_generateddxXifZ/api.d.ts' -> '/home/dan/Projects/trickle/convex/_generated/api.d.ts'
at Object.renameSync (node:fs:993:3)
at RecordingFs.rename (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:305741:23)
at syncFromTemp (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:308031:14)
at /home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:308002:7
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NodeFs.mkdtemp (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:305598:7)
at async RecordingFs.mkdtemp (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:305736:5)
at async doCodegen (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:307965:3)
at async runPush (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:309502:5)
at async Command2.<anonymous> (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:309720:7)
Preparing Convex functions...
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EXDEV: cross-device link not permitted, rename '/tmp/_generateddxXifZ/api.d.ts' -> '/home/dan/Projects/trickle/convex/_generated/api.d.ts'
at Object.renameSync (node:fs:993:3)
at RecordingFs.rename (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:305741:23)
at syncFromTemp (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:308031:14)
at /home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:308002:7
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NodeFs.mkdtemp (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:305598:7)
at async RecordingFs.mkdtemp (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:305736:5)
at async doCodegen (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:307965:3)
at async runPush (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:309502:5)
at async Command2.<anonymous> (/home/dan/Projects/trickle/node_modules/convex/dist/cli.bundle.cjs:309720:7)
jamwt
jamwt3y ago
@sujayakar ^
sujayakar
sujayakar3y ago
ah yep, the cross file system rename is what’s causing this. we first stage changes to the local filesystem in a temporary directory and then swap them in, so file system watchers like next dev don’t observe partial versions of files. however, renames are only allowed within a filesystem, so ideally we should use a temporary directory within the same filesystem as your repo. we’ll fix this in our next release!
Dan Mercer
Dan MercerOP3y ago
Awesome, thanks! I'll wait until the next release to upgrade then 👍
RJ
RJ3y ago
(I'm seeing this in deploys on Netlify as well, via npx convex codegen)
sujayakar
sujayakar3y ago
ah interesting @RJ ! can you paste the error you’re seeing?
RJ
RJ3y ago
11:20:09 AM: $ npx convex codegen && npx parcel build src/elm-ts/index.html && npx convex deploy
11:20:10 AM: Running TypeScript typecheck, add --typecheck=disable to disable.
11:20:10 AM: writing /tmp/_generatedwNOdNG/clientConfig.d.ts
11:20:10 AM: writing /tmp/_generatedwNOdNG/clientConfig.js
11:20:14 AM: writing /tmp/_generatedwNOdNG/dataModel.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/dataModel.js
11:20:14 AM: writing /tmp/_generatedwNOdNG/server.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/server.js
11:20:14 AM: writing /tmp/_generatedwNOdNG/api.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/react.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/react.js
11:20:14 AM: node:fs:1026
11:20:14 AM: handleErrorFromBinding(ctx);
11:20:14 AM: ^
11:20:14 AM: Error: EXDEV: cross-device link not permitted, rename '/tmp/_generatedwNOdNG/api.d.ts' -> 'src/convex/_generated/api.d.ts'
11:20:14 AM: at Object.renameSync (node:fs:1026:3)
11:20:14 AM: at NodeFs.rename (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:305604:30)
11:20:14 AM: at syncFromTemp (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:308031:14)
11:20:14 AM: at /opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:308002:7
11:20:14 AM: at async NodeFs.mkdtemp (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:305598:7)
11:20:14 AM: at async doCodegen (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:307965:3)
11:20:14 AM: at async Command2.<anonymous> (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:309124:3)
11:20:14 AM: at async Command2.parseAsync (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:1037:9)
11:20:14 AM: at async main2 (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:309968:5) {
11:20:14 AM: errno: -18,
11:20:14 AM: syscall: 'rename',
11:20:14 AM: code: 'EXDEV',
11:20:14 AM: path: '/tmp/_generatedwNOdNG/api.d.ts',
11:20:14 AM: dest: 'src/convex/_generated/api.d.ts'
11:20:14 AM: }
11:20:09 AM: $ npx convex codegen && npx parcel build src/elm-ts/index.html && npx convex deploy
11:20:10 AM: Running TypeScript typecheck, add --typecheck=disable to disable.
11:20:10 AM: writing /tmp/_generatedwNOdNG/clientConfig.d.ts
11:20:10 AM: writing /tmp/_generatedwNOdNG/clientConfig.js
11:20:14 AM: writing /tmp/_generatedwNOdNG/dataModel.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/dataModel.js
11:20:14 AM: writing /tmp/_generatedwNOdNG/server.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/server.js
11:20:14 AM: writing /tmp/_generatedwNOdNG/api.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/react.d.ts
11:20:14 AM: writing /tmp/_generatedwNOdNG/react.js
11:20:14 AM: node:fs:1026
11:20:14 AM: handleErrorFromBinding(ctx);
11:20:14 AM: ^
11:20:14 AM: Error: EXDEV: cross-device link not permitted, rename '/tmp/_generatedwNOdNG/api.d.ts' -> 'src/convex/_generated/api.d.ts'
11:20:14 AM: at Object.renameSync (node:fs:1026:3)
11:20:14 AM: at NodeFs.rename (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:305604:30)
11:20:14 AM: at syncFromTemp (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:308031:14)
11:20:14 AM: at /opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:308002:7
11:20:14 AM: at async NodeFs.mkdtemp (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:305598:7)
11:20:14 AM: at async doCodegen (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:307965:3)
11:20:14 AM: at async Command2.<anonymous> (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:309124:3)
11:20:14 AM: at async Command2.parseAsync (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:1037:9)
11:20:14 AM: at async main2 (/opt/build/repo/node_modules/convex/dist/cli.bundle.cjs:309968:5) {
11:20:14 AM: errno: -18,
11:20:14 AM: syscall: 'rename',
11:20:14 AM: code: 'EXDEV',
11:20:14 AM: path: '/tmp/_generatedwNOdNG/api.d.ts',
11:20:14 AM: dest: 'src/convex/_generated/api.d.ts'
11:20:14 AM: }
Gonza
Gonza3y ago
I'm also seeing this on Convex 0.5, any updates?
sujayakar
sujayakar3y ago
hi @Gonza ! ah interesting, thanks for the report. can you paste the error backtrace you're seeing in the terminal (like the lines starting with Error: EXDEV: cross-device link not permitted)?
Gonza
Gonza3y ago
Sorry, seems like I had a cache issue on Netlify, I re-ran it with the 'clean cache' option (or sth like that) and it's working now, thanks!
sujayakar
sujayakar3y ago
no worries! glad it worked out.

Did you find this page helpful?