NagariaHussain / doppio

A Frappe app (CLI) to magically setup single page applications and Vue/React powered desk pages on your custom Frappe apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bash: app-name: No such file or directory

saru2020 opened this issue · comments

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

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.

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?

Hey, try this:

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

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

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

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

Hi!

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

[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

Hi!

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

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

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