Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.15 asset files not found in subdirectories #8268

Closed
1 of 9 tasks
trueleader opened this issue Jul 4, 2022 · 5 comments
Closed
1 of 9 tasks

1.15 asset files not found in subdirectories #8268

trueleader opened this issue Jul 4, 2022 · 5 comments
Assignees
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:fixed-next-drop Issue planned to be fixed in an upcoming release. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Milestone

Comments

@trueleader
Copy link

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • SPFx 1.15.0
  • Node.js 14.19.0 / 16.15.1
  • rush-stack-compiler-4.5 0.2.2
  • typescript 4.5.5

Describe the bug / error

My solution contains many assets in subdirectories.
After upgrading:

  • SPFx from v1.14.0 to 1.15.0
  • Typescript from 4.2.4 to 4.5.5
  • rush-stack-compiler-4.2 to 4.5

the assets inside the subdirectory are not found any more.
Updating Node from 14.19.0 to 16.15.1 doesn´t change the behavior.

...
[13:33:09] Finished subtask 'configure-webpack' after 540 ms
[13:33:09] Starting subtask 'webpack'...
[13:33:45] Finished subtask 'webpack' after 36 s
[13:33:45] Finished 'bundle' after 49 s
[13:33:46] ==================[ Finished ]==================
[13:33:46] Project gremlin-app version:1.4.2
[13:33:46] Build tools version:3.17.19
[13:33:46] Node version:v16.15.1
[13:33:46] Total duration:53 s
Build target: SHIP
[13:33:50] Using gulpfile C:\Projects\DLH-Gremlin\frontend\gulpfile.js
[13:33:50] Starting 'package-solution'...
[13:33:50] Starting gulp
[13:33:50] Starting subtask 'package-solution'...
[13:33:50] [package-solution] Found manifest: d0ec8b24-aaed-4887-98bd-ca211f0d2df7.manifest.json
[13:33:50] [package-solution] Found client-side build resource: AttachmentsStrings_de-de_41b37811bcc79ecf4a77a747941bab64.js
[13:33:50] [package-solution] Found client-side build resource: AttachmentsStrings_en-us_7578bcfc2aa5089904319a9d3e401f92.js
[13:33:50] [package-solution] Found client-side build resource: ControlStrings_bg-bg_563ca021db63b04d5f0a11a1057f4651.js
...
[13:33:50] [package-solution] Found teams icons: d0ec8b24-aaed-4887-98bd-ca211f0d2df7_outline.png
[13:33:50] [package-solution] Verifying configuration...
[13:33:50] [package-solution] Done!
[13:33:50] [package-solution]
[13:33:50] [package-solution] Normalizing solution information...
[13:33:50] [package-solution] Attempting creating component definitions for {1} manifests
[13:33:50] [package-solution] Created component definitions for {1} manifests
[13:33:50] [package-solution] feature.componentIds not set! Adding all [1] components to feature { Gremlin Structure }.
[13:33:50] Error - [package-solution]
[13:33:50] Error - [package-solution] Error: Cannot find module "initial\Lists\AgendaItemAdditionsSchema.xml" from "C:\Projects\DLH-Gremlin\frontend/sharepoint/assets".
    at Function.resolveModule (C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\spfx-heft-plugins\node_modules\@rushstack\node-core-library\lib\Import.js:176:19)
    at resolveFeatureFile (C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\spfx-heft-plugins\lib\plugins\packageSolutionPlugin\packageSolution\utils\normalizeSolutionDefinition.js:247:43)
    at C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\spfx-heft-plugins\lib\plugins\packageSolutionPlugin\packageSolution\utils\normalizeSolutionDefinition.js:231:40
    at Array.map (<anonymous>)
    at resolveFeatureFiles (C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\spfx-heft-plugins\lib\plugins\packageSolutionPlugin\packageSolution\utils\normalizeSolutionDefinition.js:231:22)
    at normalizeSolutionDefinition (C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\spfx-heft-plugins\lib\plugins\packageSolutionPlugin\packageSolution\utils\normalizeSolutionDefinition.js:214:43)
    at createPackage (C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\spfx-heft-plugins\lib\plugins\packageSolutionPlugin\packageSolution\createPackage.js:36:51)
    at SolutionPackager.packageSolutionAsync (C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\spfx-heft-plugins\lib\plugins\packageSolutionPlugin\SolutionPackager.js:190:43)
    at async PackageSolutionTask.executeTask (C:\Projects\DLH-Gremlin\frontend\node_modules\@microsoft\sp-build-core-tasks\lib\packageSolution\PackageSolutionTask.js:20:9)
[13:33:50] Error - 'package-solution' sub task errored after 138 ms
 Cannot find module "initial\Lists\AgendaItemAdditionsSchema.xml" from "C:\Projects\DLH-Gremlin\frontend/sharepoint/assets".
[13:33:50] 'package-solution' errored after 181 ms
[13:33:50]
About to exit with code: 1
Process terminated before summary could be written, possible error in async code not continuing!
Trying to exit with exit code 1

Steps to reproduce

  1. Sharepoint assets inside folders:
    image

  2. config/package-solution.json:

{
    "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
    "solution": {
        ...
        "features": [
            {
                "title": "Gremlin Structure",
                "description": "Fields, ContentTypes and Lists of Gremlin",
                "id": "e4eb077e-2d96-4b5a-bebe-1f978017bb97",
                "version": "1.4.0.5",
                "assets": {
                    "elementManifests": [
                        "initial/Fields.xml",
                        "initial/ContentTypes.xml",
                        "initial/Lists/AgendaItemAdditionsInstance.xml",
                        ...
                    ],
                    "elementFiles": [
                        "initial/Lists/AgendaItemAdditionsSchema.xml",
                        "initial/Lists/AgendaItemsSchema.xml",
                        ...
                    ],
                    "upgradeActions": [
                        "v1.1.0/Migration_v1.1.0.xml",
                        ...
                    ]
                }
            }
        ]
    },
    "paths": {
        "zippedPackage": "solution/gremlin-app.sppkg"
    }
}
  1. npm run dist

Expected behavior

Getting a .sppkg file after npm run dist

@trueleader trueleader added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Jul 4, 2022
@ghost
Copy link

ghost commented Jul 4, 2022

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

@ghost ghost added the Needs: Triage 🔍 Awaiting categorization and initial review. label Jul 4, 2022
@AJIXuMuK AJIXuMuK added area:spfx Category: SharePoint Framework (not extensions related) and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels Jul 5, 2022
@AJIXuMuK AJIXuMuK self-assigned this Jul 5, 2022
@AJIXuMuK AJIXuMuK added the status:fixed-next-drop Issue planned to be fixed in an upcoming release. label Jul 8, 2022
@AJIXuMuK AJIXuMuK added this to the 1.15.0-next milestone Jul 8, 2022
@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented Jul 8, 2022

Thank you @trueleader for reporting this one!
The fix has been made and will be included in the next released version of the SPFx.

@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented Aug 2, 2022

1.15.2 is out - this should be fixed

@AJIXuMuK AJIXuMuK closed this as completed Aug 2, 2022
@trueleader
Copy link
Author

Update is working, thx :)

@ghost
Copy link

ghost commented Aug 11, 2022

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@SharePoint SharePoint locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:fixed-next-drop Issue planned to be fixed in an upcoming release. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

2 participants