NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 195 forks source link

CLI does not generate all icons #5126

Closed rosen-vladimirov closed 4 years ago

rosen-vladimirov commented 4 years ago

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

Describe the bug When executing tns resources generate icons <my_icon.png>, CLI 6.2.0 shows several warnings and does not generate some of the icons:

Didn't find a matching image definition for file AppIcon.appiconset\icon-20@2x.png. This file will be skipped from reources generation.
Didn't find a matching image definition for file AppIcon.appiconset\icon-20@3x.png. This file will be skipped from reources generation.
Didn't find a matching image definition for file AppIcon.appiconset\icon-20.png. This file will be skipped from reources generation.
Didn't find a matching image definition for file AppIcon.appiconset\icon-20@2x.png. This file will be skipped from reources generation.

CLI 6.1.x works correctly in this case.

To Reproduce

  1. Install CLI 6.2.0 (npm i -g nativescript@6.2.0)

  2. Create new project: tns create myApp --js

  3. Navigate to the project: cd myApp

  4. Try to generate icons: tns resources generate icons <some_icon.png> You'll see warnings

  5. Check App_Resources\iOS\Assets.xcassets\AppIcon.appiconset - three of the icons are not replaced.

Expected behavior CLI should generate all icons.

Sample project

Additional context

EdJones commented 4 years ago

I can confirm this behavior in Sidekick on Window 10. I have tns-core-modules 6.2.1 installed.

Can this be what is giving the the dread "Spawn error" when uploading to Apple?

ritasumtsova commented 4 years ago

Can this be what is giving the the dread "Spawn error" when uploading to Apple?

I have the same issue drives me crazy!

EdJones commented 4 years ago

Can this be what is giving the the dread "Spawn error" when uploading to Apple?

I have the same issue drives me crazy!

Rita, did you check your logs (Sidekick menu>Help>Show Logs). Sometimes this helps.

Also, I have opened an issue to help developers deal with the cryptic Spawn error message: https://github.com/NativeScript/sidekick-feedback/issues/441

ritasumtsova commented 4 years ago

Rita, did you check your logs (Sidekick menu>Help>Show Logs). Sometimes this helps.

Yeap, I checked it. I updated everything in my project and expected all is going to be fine, but now I have this one https://github.com/NativeScript/nativescript-cli/issues/5141

DecentGradient commented 4 years ago

I'm having this exact issue in version 6.7.4

NathanaelA commented 4 years ago

@DecentGradient - Hi Joseph, is this using SideKick or the NS CLI command? In addition, if you need to get icons generated right away; you can use the free service https://images.nativescript.rocks to generate any images.

DecentGradient commented 4 years ago

@NathanaelA Using NS cli, thanks for the tip

NathanaelA commented 4 years ago

@DecentGradient - I just tested with the instructions above and it created all the resources correctly:

Before: image

After: image

Is it possible your App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json came from an older version of NativeScript (NS 5 or before). Can you provide it?

DecentGradient commented 4 years ago

It's definitely brand a new NS project, will provide screen shot as soon as possible

On Wed, Jun 17, 2020, 12:30 AM Nathanael Anderson notifications@github.com wrote:

@DecentGradient https://github.com/DecentGradient - I just tested with the instructions above and it created all the resources correctly:

Before: [image: image] https://user-images.githubusercontent.com/850871/84855122-f7281100-b028-11ea-9b80-f009db724648.png

After: [image: image] https://user-images.githubusercontent.com/850871/84855138-fc855b80-b028-11ea-8e02-6073be796c39.png

Is it possible your App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json came from an older version of NativeScript (NS 5 or before). Can you provide it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NativeScript/nativescript-cli/issues/5126#issuecomment-645142482, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDGK4C7SQEPMHZTNGEYJDLRXBBGTANCNFSM4JMXB7SQ .

DecentGradient commented 4 years ago

hmm it works, only thing i did is reinstall NS globally 🤷

DecentGradient commented 4 years ago

Thanks for your responsiveness and making me feel welcome!