pnp/sp-dev-fx-extensions

react-application-machine-translations: Unable to package "react-application-machine-translations"

Closed this issue · 2 comments

react-application-machine-translations

@agtenr

How to create sppkg?

Steps followed:

  1. git clone & npm install
  2. Test using "gulp serve" -- works perfectly
  3. Attempt to create a sppkg file by running the following commands:
gulp clean
gulp bundle --ship
gulp package-solution --ship

The "gulp bunde --ship" command completes successfully, however "gulp package-solution --ship" dies with:

[14:36:02] Error - 'package-solution' sub task errored after 47 ms
 Could not find Element Manifest: sharepoint\assets/elements.xml

Dev station is running Win10 with npm 6.14.6 and node v10.22.0

Full output is below. Thanks in advance for any suggestions!

V:\spdev\react-application-machine-translations
λ gulp bundle --ship
Build target: SHIP
[14:35:47] Using gulpfile V:\spdev\react-application-machine-translations\gulpfile.js
[14:35:47] Starting gulp
[14:35:47] Starting 'bundle'...
[14:35:47] Starting subtask 'configure-sp-build-rig'...
[14:35:47] Finished subtask 'configure-sp-build-rig' after 5.2 ms
[14:35:47] Starting subtask 'pre-copy'...
[14:35:47] Finished subtask 'pre-copy' after 5.86 ms
[14:35:47] Starting subtask 'copy-static-assets'...
[14:35:47] Starting subtask 'sass'...
[14:35:47] Finished subtask 'sass' after 57 ms
[14:35:47] Starting subtask 'tslint'...
[14:35:48] [tslint] tslint version: 5.12.1
[14:35:48] Starting subtask 'tsc'...
[14:35:48] [tsc] typescript version: 3.3.4000
[14:35:48] Finished subtask 'copy-static-assets' after 514 ms
[14:35:50] Finished subtask 'tsc' after 1.9 s
[14:35:50] Finished subtask 'tslint' after 2.63 s
[14:35:50] Starting subtask 'post-copy'...
[14:35:50] Finished subtask 'post-copy' after 1.73 ms
[14:35:50] Starting subtask 'collectLocalizedResources'...
[14:35:50] Finished subtask 'collectLocalizedResources' after 3.63 ms
[14:35:50] Starting subtask 'configure-webpack'...
[14:35:50] Finished subtask 'configure-webpack' after 411 ms
[14:35:50] Starting subtask 'webpack'...
[14:35:54] Finished subtask 'webpack' after 4.04 s
[14:35:54] Starting subtask 'configure-webpack-external-bundling'...
[14:35:54] Finished subtask 'configure-webpack-external-bundling' after 869 μs
[14:35:54] Starting subtask 'copy-assets'...
[14:35:55] Finished subtask 'copy-assets' after 459 ms
[14:35:55] Starting subtask 'write-manifests'...
[14:35:55] Finished subtask 'write-manifests' after 452 ms
[14:35:55] Finished 'bundle' after 8.1 s
[14:35:56] ==================[ Finished ]==================
[14:35:56] Project machine-translation-extension version:0.0.1
[14:35:56] Build tools version:3.12.1
[14:35:56] Node version:v10.22.0
[14:35:56] Total duration:11 s

V:\spdev\react-application-machine-translations
λ gulp package-solution --ship
Build target: SHIP
[14:36:02] Using gulpfile V:\spdev\react-application-machine-translations\gulpfile.js
[14:36:02] Starting gulp
[14:36:02] Starting 'package-solution'...
[14:36:02] Starting subtask 'configure-sp-build-rig'...
[14:36:02] Finished subtask 'configure-sp-build-rig' after 4.51 ms
[14:36:02] Starting subtask 'package-solution'...
[14:36:02] [package-solution] Found manifest: V:\spdev\react-application-machine-translations\temp\deploy\aa40cc51-6498-4c01-91d4-b5f8d2fe1e8b.json
[14:36:02] [package-solution] Found client-side build resource: machine-translation-extension-application-customizer_d54979265b1c45554ff4d4fd22591f06.js
[14:36:02] Verifying configuration...
[14:36:02] Done!
[14:36:02]
[14:36:02] Normalizing solution information...
[14:36:02] Attempting creating component definitions for {1} manifests
[14:36:02] Created component definitions for {1} manifests
[14:36:02] feature.componentIds not set! Adding all [1] components to feature { Application Extension - Deployment of custom action. }.
[14:36:02] Done!
[14:36:02]
[14:36:02] Reading custom Feature XML...
[14:36:02] Done!
[14:36:02]
[14:36:02] Validating App Package...
[14:36:02] Warning - Admins can make this solution available to all sites immediately, but the solution also contains feature.xml elements for provisioning. Feature.xml elements are not automatically applied unless the solution is explicitly installed on a site.
[14:36:02] Done!
[14:36:02]
[14:36:02] Reading resources...
[14:36:02] Done!
[14:36:02]
[14:36:02] Reading Sharepoint Assets & Creating XML...
[14:36:02] Error - 'package-solution' sub task errored after 47 ms
 Could not find Element Manifest: sharepoint\assets/elements.xml
[14:36:02] 'package-solution' errored after 60 ms
[14:36:02]
[14:36:02] ==================[ Finished ]==================
Warning - Admins can make this solution available to all sites immediately, but the solution also contains feature.xml elements for provisioning. Feature.xml elements are not automatically applied unless the solution is explicitly installed on a site.
Error - 'package-solution' sub task errored after 47 ms
 Could not find Element Manifest: sharepoint/assets/elements.xml
[14:36:03] Project machine-translation-extension version:0.0.1
[14:36:03] Build tools version:3.12.1
[14:36:03] Node version:v10.22.0
[14:36:03] Total duration:2.77 s
[14:36:03] Task warnings:1
[14:36:03] Task errors:1
The build failed because a task wrote output to stderr.
Exiting with exit code: 1

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ericpskl , thanks for reaching out. I indeed see that the /sharepoint/assets folder is missing from the code. This folder contains the elements.xml with the configuration settings. I will look into this issue.

@hugoabernier can this be assigned to me? I will investigate and provide a PR with a fix.