capacitor-assets icon indicating copy to clipboard operation
capacitor-assets copied to clipboard

Can´t generate assets by using angular

Open Excel1 opened this issue 2 years ago • 1 comments

I installed the dependency like written in the ReadMe.md. "@capacitor/assets": "^3.0.4"

Im using Angular with Ionic/Capacitor and my folder structure looks like following:

  • MyApp -- src --- assets -- android -- ios -- www

Now i wanted to generate my assets but by using npx @capacitor/assets generate --android

Asset directory not found at ... Use --asset-path to specify a specific directory containing assets

Now with npx @capacitor/assets generate --android --asset-path MyPath

error: unknown option '--asset-path'

If i go into my folder /src and try it again npx @capacitor/assets generate --android

No platforms found, exiting

Now using without android it works but only generate assets for pwa.

Excel1 avatar Feb 19 '24 14:02 Excel1

Work around. Create a new asset folder with the assets directly in MyApp folder.

Excel1 avatar Feb 19 '24 14:02 Excel1