ampp
ampp2w ago

cross-device link not permitted

I for the life of me cant get past this error.
https://docs.convex.dev/cli/local-deployments local deployment (BETA)
⠋ Reinitializing project 37186...

Temporary directory '/tmp' and project directory 'convex/_generated' are on different filesystems.
If you're running into errors with other tools watching the project directory, override the temporary directory location with the CONVEX_TMPDIR environment variable.
✔ Reinitialized project 37186
✔ Started running a deployment locally at http://127.0.0.1:3210 and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/local-ludumvitae-lvlocal_37186-1

Error: Unable to start push to http://127.0.0.1:3210
Error fetching POST http://127.0.0.1:3210/api/deploy2/start_push 400 Bad Request: InvalidExternalModules: Hit an error while pushing:
Loading the pushed modules encountered the following error:
EXDEV: cross-device link not permitted, rename '/tmp/.tmpOSWGnt/build_deps/node_modules.zip' -> '/home/USER/.convex/convex-backend-state/PROJECT_ID/convex_local_storage/modules/70ce4290-4da0-4929-a834-0fe25c255609.blob'
https://docs.convex.dev/cli/local-deployments local deployment (BETA)
⠋ Reinitializing project 37186...

Temporary directory '/tmp' and project directory 'convex/_generated' are on different filesystems.
If you're running into errors with other tools watching the project directory, override the temporary directory location with the CONVEX_TMPDIR environment variable.
✔ Reinitialized project 37186
✔ Started running a deployment locally at http://127.0.0.1:3210 and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at https://dashboard.convex.dev/d/local-ludumvitae-lvlocal_37186-1

Error: Unable to start push to http://127.0.0.1:3210
Error fetching POST http://127.0.0.1:3210/api/deploy2/start_push 400 Bad Request: InvalidExternalModules: Hit an error while pushing:
Loading the pushed modules encountered the following error:
EXDEV: cross-device link not permitted, rename '/tmp/.tmpOSWGnt/build_deps/node_modules.zip' -> '/home/USER/.convex/convex-backend-state/PROJECT_ID/convex_local_storage/modules/70ce4290-4da0-4929-a834-0fe25c255609.blob'
This is what i get if i run local dev, cloud is fine. I had gotten rid of my CONVEX_TMPDIR setting temporarily (its been on there so long i forgot why i had it) I'm not sure its related as i was having issues with switching between various local backends from different repos.
I dont know if i had CONVEX_TMPDIR locally set somewhere. It shows I've tried new projects Added it to .env.local I deleted temp i deleted ./convex Reconfigured countless times. nvm use 18 etc etc
14 Replies
Convex Bot
Convex Bot2w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ampp
amppOP2w ago
When i first provision i get CONVEX_TMPDIR warning regardless it seems. But then when i run npx convex dev later it doesn't show that warning. But then i don't get any files into my However export CONVEX_TMPDIR=/newtemp gets rid of the error but doesnt fix it I'm on ubuntu 24.10, seems like running convex as root would work as i get to the node 18 error but id have to downgrade node as nvm isnt setup on root. no luck with reboot Any ideas about what else i could try
erquhart
erquhart2w ago
figuring out who to ping here cc/ @sshader
Nicolas
Nicolas2w ago
Someone here fixed a similar issue in the past by regenerating the convex folder, have you tried that by any chance? https://discord.com/channels/1019350475847499849/1019350478817079338/1207338632260882473
ampp
amppOP2w ago
ok i deleted my generated folder but for some reason what is also happening on cloud dev is i'm getting the
✔ Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at
✔ Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or support@convex.dev
View the Convex dashboard at
every time i run npx convex dev The first time i run npx convex dev im getting
Temporary directory '/tmp' and project directory Temporary directory '/tmp' and project directory
Temporary directory '/tmp' and project directory Temporary directory '/tmp' and project directory
but also randomly during every dozen or two pushes I have triple checked my CONVEX_TMPDIR but somehow it sure doesn't seem like its being read. Before it was set to a folder that didn't exist from my old computer... now it does exist.
Nicolas
Nicolas2w ago
What do you mean by this?
However export CONVEX_TMPDIR=/newtemp gets rid of the error but doesnt fix it
ampp
amppOP2w ago
I was experimenting with local env variables on ubuntu too, seeing if that would help As i understand the CONVEX_TMPDIR must be set on the convex backend environment vars? I also have it set in .env.local.
Nicolas
Nicolas2w ago
No, you need to set it on your local machine (the one you're running convex dev on) I think using .env.local will not work here Could you try moving export CONVEX_TMPDIR=/newtmp to your bashrc file (or equivalent for your shell)?
ampp
amppOP2w ago
The CONVEX_TMPDIR warning is gone but when i configure back to npx run dev --configure and select local it still creates temp files in /tmp/ nothing is getting created in my specified folder so i still get the cross-device link not permitted I was thinking /tmp was on my main drive but its actually in ram.
findmnt /tmp
TARGET SOURCE FSTYPE OPTIONS
/tmp tmpfs tmpfs rw,nosuid,nodev,nr_inodes=1048576,inode64
findmnt /tmp
TARGET SOURCE FSTYPE OPTIONS
/tmp tmpfs tmpfs rw,nosuid,nodev,nr_inodes=1048576,inode64
Nicolas
Nicolas2w ago
Can you please send me the whole output you're getting?
ampp
amppOP2w ago
it seems to be something with this project as i can run other things locally, i just cant figure out what is different. Im trying the local deployment on different projects on convex cloud just in case. I also notice that there is nothing in my defined TMP folder even when i use a working local deployment
sshader
sshader2w ago
Ah I see a spot where we're not respecting CONVEX_TMPDIR -- this is specific to running node functions that use external packages. Sounds like you know this already, but switching to cloud should always work. We'll work on fixing this and can report back
ampp
amppOP2w ago
cool. Thanks! I'm curious if while you are at it, could it be possible to add a feature for changing up local ports quickly or just moving to new ones if that port is unavailable, i keep wanting to run a couple local deployments at a time. (I haven't had time to like dig into this, so maybe its already solved )
sshader
sshader2w ago
moving to new ones if that port is unavailable
This should already be true! Let us know if you've seen issues running multiple at a time. There's also CLI args (currently hidden) for --local-cloud-port (the .convex.cloud equivalent, usually 3210) + --local-site-port(the .convex.site equivalent, usually 3211), which we can expose + make easier to use

Did you find this page helpful?