Back
Can not start function locally. Getting Error: connect ECONNREFUSED 127.0.0.1:3000
- 0
- Tools
- Functions
- Apple
- Cloud
lightning
- Docker is running
- See: https://appwrite.io/blog/post/functions-local-development-guide
- Using appwrite-cli@6.0.0 installed via npm -g
- Also see the sh: undefined: not found
- And: tar: invalid magic tar: short read
TypeScript
➜ appwrite git:(main) ✗ appwrite run function --with-variables --no-reload
? Which function would you like to develop locally? scrape-user-data (scrape-user-data)
runtime │ entrypoint │ path │ commands │ scopes
───────────┼─────────────────────────────────────────┼───────────────────────────────────┼──────────┼────────
node-18.0 │ appwrite-functions-scrape-user-data.mjs │ functions/scrape-user-data/output │ │ []
ℹ Info: If you wish to change your local settings, update the appwrite.json file and rerun the 'appwrite run' command.
♥ Hint: Permissions, events, CRON and timeouts dont apply when running locally.
ℹ Info: Verifying Docker image ...
ℹ Info: Building function using Docker ...
Preparing for build ...
Building ...
sh: undefined: not found
ℹ Info: Starting function using Docker ...
♥ Hint: Function automatically restarts when you edit your code.
Preparing for start ...
tar: invalid magic
tar: short read
✗ Error: connect ECONNREFUSED 127.0.0.1:3000
TL;DR
Developers are unable to start the function locally due to an ECONNREFUSED error (connect ECONNREFUSED 127.0.0.1:3000) while using appwrite-cli@6.0.0. The issue may be related to Docker, with error messages mentioning 'sh: undefined: not found' and 'tar: invalid magic'.
Suggested Solution:
- Check if Docker is running properly.
- Review the appwrite-cli documentation (https://appwrite.io/blog/post/functions-local-development-guide) for troubleshooting steps.
- Update the appwrite.json file to modify local settings and rerun the 'app Recommended threads
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...