NagariaHussain / doppio

A Frappe app (CLI) to magically setup single page applications and Vue/React powered desk pages on your custom Frappe apps.
MIT License
196 stars 75 forks source link

bash: app-name: No such file or directory #3

Closed saru2020 closed 2 years ago

saru2020 commented 2 years ago

When i try to create an app using add-spa command: bench add-spa --app <app-name> [--tailwindcss]

it is throwing the below error: bash: app-name: No such file or directory

When I check bench commands by running: bench --help

it did show the that add-spa command under framework commands list:

Framework commands: add-spa add-system-manager Add a new system manager to a site add-to-email-queue Add an email to the Email Queue add-to-hosts Add site to hosts backup Backup

NagariaHussain commented 2 years ago

Hi!

The app should already exist for this command to work. So, you need to first create an app using 'bench new-app ' and then run this command.

saru2020 commented 2 years ago

ok, but I already have an app. Also, just tried creating a new app by running bench new-app sample_spa, a brand new app got created successfully, and then when I ran: bench add-spa --app sample_spa [--tailwindcss], it says this: Error: No such command "add-spa". and when I run: bench add-spa --app <app-name> [--tailwindcss], it says this: bash: app-name: No such file or directory

Am I still missing anything?

NagariaHussain commented 2 years ago

Hey, try this:

$ bench clear-command-cache # To load the command if it was not loaded properly

$ bench add-spa --app sample_spa --tailwindcss

saru2020 commented 2 years ago

yes, clearing the cache worked, thanks for the support @NagariaHussain.

saru2020 commented 2 years ago

The same issue(https://github.com/NagariaHussain/digistore/issues/2#issuecomment-991918442) is happening for a new app/site created with this lib as well. Also, the dashboard is not visible in 'http://localhost:8000/app'

NagariaHussain commented 2 years ago

Hi!

I am looking into this. Can you share if there is something in console or bench log?

saru2020 commented 2 years ago

[vite]: Rollup failed to resolve import "vue" from "../../doppio/libs/resourceManager/index.js". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.external error during build: Error: [vite]: Rollup failed to resolve import "vue" from "../../doppio/libs/resourceManager/index.js". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.external at onRollupWarning (/Users/saravanan_vij/Documents/Learnings/Other_Learnings/Tryouts/Frappe_15dec2021/frappe-bench/apps/sampleapp/sampleappdashboard/node_modules/vite/dist/node/chunks/dep-7817f5b4.js:43756:19) at onwarn (/Users/saravanan_vij/Documents/Learnings/Other_Learnings/Tryouts/Frappe_15dec2021/frappe-bench/apps/sampleapp/sampleappdashboard/node_modules/vite/dist/node/chunks/dep-7817f5b4.js:43534:13) at Object.onwarn (/Users/saravanan_vij/Documents/Learnings/Other_Learnings/Tryouts/Frappe_15dec2021/frappe-bench/apps/sampleapp/sampleappdashboard/node_modules/rollup/dist/shared/rollup.js:22978:13) at ModuleLoader.handleResolveId (/Users/saravanan_vij/Documents/Learnings/Other_Learnings/Tryouts/Frappe_15dec2021/frappe-bench/apps/sampleapp/sampleappdashboard/node_modules/rollup/dist/shared/rollup.js:22322:26) at /Users/saravanan_vij/Documents/Learnings/Other_Learnings/Tryouts/Frappe_15dec2021/frappe-bench/apps/sampleapp/sampleappdashboard/node_modules/rollup/dist/shared/rollup.js:22299:26

NagariaHussain commented 2 years ago

Hi!

I have pushed some fixes, you have to update doppio and then create a new SPA. Please try and let me know.

saru2020 commented 2 years ago

I did 2 mistakes. I didn't do 'bench build' and I didn't add my site name to the /hosts file. Seeing no issues after doing both of the above

naourass commented 2 years ago

Thanks a lot for your work @NagariaHussain. It will be better to state in the docs that the app should be already installed to avoid confusion. image