appwrite / sdk-for-cli

[READ-ONLY] Official Appwrite CLI >_
BSD 3-Clause "New" or "Revised" License
85 stars 29 forks source link

Issue generating Appwrite database models using flutter extension #89

Open juma-sayeh opened 11 months ago

juma-sayeh commented 11 months ago

👟 Reproduction steps

Using flutter extension from feat-flutter branch when i use the cli command appwrite flutter generate

👍 Expected behavior

generate model files with no errors

👎 Actual Behavior

When i use the cli command appwrite flutter generate

i get the following error:

no such file or directory, open '/usr/local/lib/node_modules/appwrite-cli/lib/commands/../../flutter_res/template_model.dart'

i tried

appwrite flutter generate --vebose and i got the following logs:

Error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/appwrite-cli/lib/commands/../../flutter_res/template_model.dart' at Object.openSync (node:fs:601:3) at Object.readFileSync (node:fs:469:35) at generate (/usr/local/lib/node_modules/appwrite-cli/lib/commands/flutter.js:69:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errno: -2, syscall: 'open', code: 'ENOENT', path: '/usr/local/lib/node_modules/appwrite-cli/lib/commands/../../flutter_res/template_model.dart' }

after further investigation it seems like the file exists in /generator/template_dart.dart and it does work when the path points to it in /usr/local/lib/node_modules/appwrite-cli/lib/commands/flutter.js:69:31

🎲 Appwrite version

Version 1.3.x

💻 Operating system

MacOS

🧱 Your Environment

AWS EC2 amazon linux 2023

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

lohanidamodar commented 10 months ago

Hey, we are working on generator for multiple language support so, instead of using appwrite flutter generate please use appwrite generate dart