cli-microsoft365: 1.11.0 gulp package-solution --ship error

Upgraded a project with 365 CLI followed all the steps. (spfx project upgrade --output tour) gulp serve --nobrowser works fine, the web part show OK gulp bundle --ship Works OK gulp package-solution --ship Errors: [14:51:06] Verifying configuration... [14:51:06] Done! [14:51:06] [14:51:06] Normalizing solution information... [14:51:06] Attempting creating component definitions for {1} manifests [14:51:06] Created component definitions for {1} manifests [14:51:06] config.solution.features not set! Instead generating a feature for each component. [14:51:06] Creating feature for ECG Requester Inbox... [14:51:06] Done! [14:51:06] [14:51:06] Reading custom Feature XML... [14:51:06] Done! [14:51:06] [14:51:06] Validating App Package... [14:51:06] Done! [14:51:06] [14:51:06] Reading resources... [14:51:06] Done! [14:51:06] [14:51:06] Reading Sharepoint Assets & Creating XML... [14:51:06] Error - 'package-solution' sub task errored after 130 ms Cannot read property 'name' of undefined [14:51:06] 'package-solution' errored after 165 ms [14:51:06] [14:51:06] ==================[ Finished ]================== Error - 'package-solution' sub task errored after 130 ms Cannot read property 'name' of undefined [14:51:07] Project dpc-requester-inbox version:0.0.1 [14:51:07] Build tools version:3.12.1 [14:51:07] Node version:v10.16.0 [14:51:07] Total duration:5.25 s [14:51:07] Task errors:1 The build failed because a task wrote output to stderr. Exiting with exit code: 1

I ran o365$ spfx doctor --env spo and got “Error: spfx doctor doesn’t support SPFx v1.11.0 at this moment”

What Should I do to make it work? Thank you

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

OK, I’ve been able to get it reproduced. It seems like, if you don’t include the newly introduced developer section in package-solution.json, packaging the project fails.

Since this isn’t specific to Office 365 CLI, I’ll close this issue and would suggest opening a new issue in the sp-dev-docs repo.

Yep, just manually changed the package.json and ran yarn.

I suppose it’s worth noting I’ve only tried SPFx 1.11.0 in a library component so far, I’m not sure what happens with webparts or extensions.

Yep. Thanks

Yes, that seems to be the case. The official upgrade guidance in the SPFx docs should reflect that shortly.

2 things happened.

  1. I upgraded 0365Cli and now the o365 spfx project upgrade -v1.11.0 returns “Error: Office 365 CLI doesn’t support upgrading SharePoint Framework projects to version 1.11.0.”
  2. In the previous upgraded folder of the same code, I ran gulp package-solution --ship and it was OK.

What did you guys do to my computer 😃 Thanks anyway package-solution - beforeAfter.zip