Skip to content
Init is coming / May 19 - 23
Back

Local function throws EACCES error when automatically rebuilding.

  • 0
  • Self Hosted
  • Functions
  • Tools
Cord
12 May, 2025, 10:39

I am developing an Appwrite function locally. Up until now, the process has been as smooth as butter: I edit my files, save them, and this triggers a rebuild of the local function deployment. All as expected.

However, as of today, I randomly receive the error below. When it happens, the local function server stops, and I have to Ctrl-C the process and rerun appwrite run functions --port 3001 --function-id="api"

The error does not happen all the time and sometimes I get a whole 5 minutes or so of editing and switching contexts between Insomnia and VS Code before it happens.

What's more curious is that I don't even have to edit and save anything. Sometimes it's enough to click out into Insomnia or Postman, trigger the function with a few REST calls and then when I click back into VS Code, some or other "change" is detected and everything rebuilds, throwing the error.

The only difference in my environment is that I recently activated CoPilot in VS Code. Is anyone else developing Appwrite functions locally in conjunction with VS Code and Copilot? Anyone else have this problem?

TypeScript
Info: Cancelling build ...
Info: Rebuilding the function due to file changes ...
Error: EACCES: permission denied, copyfile '/Development/limetrack/cli/functions/limetrack_api/.git/modules/packages/lt_collections_appwrite/objects/pack/pack-0550a30ac4f7fbdeef0c1a57750334087627035c.idx' -> '/Development/limetrack/cli/functions/limetrack_api/.appwrite/tmp-build/.git/modules/packages/lt_collections_appwrite/objects/pack/pack-0550a30ac4f7fbdeef0c1a57750334087627035c.idx'
    at Object.copyFileSync (node:fs:3087:11)
    at dockerBuild (/opt/homebrew/Cellar/appwrite/6.2.3/libexec/lib/node_modules/appwrite-cli/lib/emulation/docker.js:76:12)
    at EventEmitter.<anonymous> (/opt/homebrew/Cellar/appwrite/6.2.3/libexec/lib/node_modules/appwrite-cli/lib/commands/run.js:219:23) {
  errno: -13,
  code: 'EACCES',
  syscall: 'copyfile',
  path: '/Development/limetrack/cli/functions/limetrack_api/.git/modules/packages/lt_collections_appwrite/objects/pack/pack-0550a30ac4f7fbdeef0c1a57750334087627035c.idx',
  dest: '/Development/limetrack/cli/functions/limetrack_api/.appwrite/tmp-build/.git/modules/packages/lt_collections_appwrite/objects/pack/pack-0550a30ac4f7fbdeef0c1a57750334087627035c.idx'
}
TL;DR
Developers face EACCES error when locally rebuilding Appwrite functions. Issue triggered by random undetected file changes during rebuild process. Possibly linked to recent CoPilot activation. Possible solution: Restart function deployment using `appwrite run functions --port 3001 --function-id="api"`.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more