0

My Adaptive Card Extension (ACE) works perfectly in the workbench, however when I try to package it, first with gulp bundle --ship then gulp package-solution --ship it fails to package.

The bundling does not present any warnings or errors. The packaging does not present any warnings but it does error and fail and the errors are not informative e.g.

  • Error - [package-solution]
  • The build failed because a task wrote output to stderr.
  • Exiting with exit code: 1

I've tried using the --debug switch for both bundle and package but it doesn't change anything.

How do I go about troubleshooting this?


Output below:

PS C:\dev\HelloWorld> gulp bundle --ship
Build target: SHIP
[17:01:30] Using gulpfile C:\dev\HelloWorld\gulpfile.js
[17:01:30] Starting 'bundle'...
[17:01:30] Starting gulp
[17:01:30] Starting subtask 'pre-copy'...
[17:01:30] Finished subtask 'pre-copy' after 40 ms
[17:01:30] Starting subtask 'copy-static-assets'...
[17:01:30] Starting subtask 'sass'...
[17:01:30] Finished subtask 'sass' after 18 ms
[17:01:30] Starting subtask 'lint'...
[17:01:30] [lint] eslint version: 8.7.0
[17:01:30] Starting subtask 'tsc'...
[17:01:30] [tsc] typescript version: 4.7.4
[17:01:30] Finished subtask 'copy-static-assets' after 98 ms
[17:01:32] Finished subtask 'tsc' after 1.84 s
[17:01:34] Finished subtask 'lint' after 3.31 s
[17:01:34] Starting subtask 'post-copy'...
[17:01:34] Finished subtask 'post-copy' after 201 μs
[17:01:34] Starting subtask 'configure-webpack'...
[17:01:34] Finished subtask 'configure-webpack' after 612 ms
[17:01:34] Starting subtask 'webpack'...
[17:01:35] Finished subtask 'webpack' after 535 ms
[17:01:35] Finished 'bundle' after 4.53 s
[17:01:35] ==================[ Finished ]==================
[17:01:36] Project hello-world version:0.0.1
[17:01:36] Build tools version:3.18.0
[17:01:36] Node version:v18.17.1
[17:01:36] Total duration:7.36 s

Followed by:

PS C:\dev\HelloWorld> gulp package-solution --ship
Build target: SHIP
[17:01:51] Using gulpfile C:\dev\HelloWorld\gulpfile.js
[17:01:51] Starting 'package-solution'...
[17:01:51] Starting gulp
[17:01:51] Starting subtask 'package-solution'...
[17:01:51] [package-solution] Found manifest: c57d101a-0ea7-499f-96c9-e4fa4888eb54.manifest.json
[17:01:51] [package-solution] Found client-side build resource: chunk.HelloWorld-property-pane_8943f53978a86fa750fc.js
[17:01:51] [package-solution] Found client-side build resource: hello-world-adaptive-card-extension_ee866047d8c03c80f641.js
[17:01:51] [package-solution] Verifying configuration...
[17:01:51] [package-solution] Done!
[17:01:51] [package-solution]
[17:01:51] [package-solution] Normalizing solution information...
[17:01:51] [package-solution] Attempting creating component definitions for {1} manifests
[17:01:51] [package-solution] Created component definitions for {1} manifests
[17:01:51] [package-solution] feature.componentIds not set! Adding 1 components to feature { hello-world Feature }.
[17:01:51] [package-solution] Done!
[17:01:51] [package-solution] 
[17:01:51] [package-solution] Reading custom Feature XML...
[17:01:51] [package-solution] Done!
[17:01:51] [package-solution]
[17:01:51] [package-solution] Validating App Package...
[17:01:51] [package-solution] Done!
[17:01:51] [package-solution]
[17:01:51] [package-solution] Reading resources...
[17:01:51] [package-solution] Done!
[17:01:51] [package-solution]
[17:01:51] [package-solution] Reading Sharepoint Assets & Creating XML...
[17:01:51] [package-solution] Done!
[17:01:51] [package-solution]
[17:01:51] [package-solution] Writing solution XML to C:\dev\HelloWorld/sharepoint/solution/debug...
[17:01:55] Error - [package-solution] 
[17:01:55] Finished subtask 'package-solution' after 3.18 s
[17:01:55] Finished 'package-solution' after 3.18 s
[17:01:55] ==================[ Finished ]==================
Error - [package-solution]
[17:01:56] Project hello-world version:0.0.1
[17:01:56] Build tools version:3.18.0
[17:01:56] Node version:v18.17.1
[17:01:56] Total duration:6.03 s
[17:01:56] Task errors:1
The build failed because a task wrote output to stderr.
Exiting with exit code: 1
PS C:\dev\HelloWorld> 
2
  • Writing solution XML to C:\dev\HelloWorld/sharepoint/solution/debug... the path switches from using Windows style back slashes to Linux style forward slashes. What's up with that? Nov 9, 2023 at 19:11
  • @DylanCristy yeah i noticed that. seems to be the standard output for "Writing solution XML to..." and "Created file: ...sppkg".
    – neptr
    Nov 10, 2023 at 10:58

2 Answers 2

1

It should help you,

Run this command line by line

gulp clean 
gulp bundle --ship

If 'gulp bundle --ship' throws an error then you should run this command without '--ship'

gulp bundle
gulp package-solution --ship
3
  • Thanks for the solution, unfortunately it didn't change anything. In the mean time, I'm going to create a new solution and bring my components across to see what happens.
    – neptr
    Nov 10, 2023 at 9:29
  • 1
    Yes @neptr it had properly worked for me when I tried my solution, so you tried with this? Nov 10, 2023 at 11:24
  • yes i tried your solution but it didn't remove the error for me. The new solution works perfectly though. Thanks for your suggestion, I'll keep that one in my toolbox! :)
    – neptr
    Nov 13, 2023 at 16:33
0

I didn't find a solution to this particular issue but by creating a new solution from scratch and copying my code across I was able to successfully create a package using:

gulp bundle --ship
gulp package-solution --ship

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.