Error[package-solution] No Manifests Were Found In 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure A Build Has Completed Successfully
Error[package-solution] No manifests were found in 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure a build has completed successfully
As we continue to migrate our SPFx web part to version 1.19.0, we encounter an error that prevents us from successfully packaging our solution. The error message reads: "Error[package-solution] No manifests were found in 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure a build has completed successfully." In this article, we will delve into the possible causes of this error and provide a step-by-step guide to resolve it.
The error message suggests that the gulp package-solution
command is unable to find any manifests in the dist
folder. This folder is where the bundled and minified files are stored after a successful build. The gulp package-solution
command is responsible for creating a package file that can be uploaded to the SharePoint tenant.
Before we dive into the solution, let's explore the possible causes of this error:
- Incomplete Build: The error message suggests that the build has not completed successfully. This could be due to a variety of reasons such as missing dependencies, incorrect configuration, or errors in the code.
- Missing Manifests: The
gulp package-solution
command relies on the presence of manifests in thedist
folder. If these manifests are missing, the command will fail. - Incorrect Configuration: The configuration files such as
config.json
andpackage-solution.json
play a crucial role in the packaging process. Any errors or inconsistencies in these files can cause the error.
To resolve the error, follow these steps:
Step 1: Verify the Build
Before attempting to package the solution, verify that the build has completed successfully. Run the following command:
gulp build --ship
This command will build the solution and create the necessary files in the dist
folder.
Step 2: Check the Manifests
Verify that the manifests are present in the dist
folder. The manifests should be in the following format:
{
"name": "Widget",
"version": "1.0.0",
"description": "A widget for SharePoint",
"main": "widget.js",
"scripts": {
"start": "gulp start"
},
"dependencies": {
"@microsoft/sp-core-library": "^1.1.1",
"@microsoft/sp-lodash-subset": "^1.1.1"
},
"devDependencies": {
"@microsoft/gulp-core-build": "^1.0.0",
"@microsoft/sp-build-web": "^1.1.1"
}
}
Step 3: Check the Configuration Files
Verify that the configuration files such as config.json
and package-solution.json
are correct and up-to-date. The config.json
file should contain the following information:
{
"version": "1.0.0",
"name": "Widget",
"description": "A widget for SharePoint",
"main": "widget.js",
"scripts": {
"start": "gulp start"
},
"dependencies": {
"@microsoft/sp-core-library": "^1.1.1",
"@microsoft/sp-lodash-subset": "^1.1.1"
},
"devDependencies": {
"@microsoft/gulp-core-build": "^1.0.0",
"@microsoft/sp-build-web": "^1.1.1"
}
}
The package-solution.json
file should contain the following information:
{
"name": "Widget",
"version": "1.0.0",
"description": "A widget for SharePoint",
"main": "widget.js",
"scripts": {
"start": "gulp start"
},
"dependencies": {
"@microsoft/sp-core-library": "^1.1.1",
"@microsoft/sp-lodash-subset": "^1.1.1"
},
"devDependencies": {
"@microsoft/gulp-core-build": "^1.0.0",
"@microsoft/sp-build-web": "^1.1.1"
}
}
Step 4: Run the Package-Solution Command
Once you have verified that the build has completed successfully and the manifests are present, run the following command:
gulp package-solution --ship
This command will create a package file that can be uploaded to the SharePoint tenant.
In this article, we have explored the possible causes of the error "Error[package-solution] No manifests were found in 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure a build has completed successfully." and provided a step-by-step guide to resolve it. By following these steps, you should be able to successfully package your SPFx web part and upload it to the SharePoint tenant.
If you continue to encounter issues, try the following troubleshooting tips:
- Check the console output: Verify that there are no errors or warnings in the console output.
- Check the configuration files: Verify that the configuration files are correct and up-to-date.
- Check the manifests: Verify that the manifests are present in the
dist
folder. - Try a clean build: Run the following command to perform a clean build:
gulp clean
gulp build --ship
gulp package-solution --ship
This will remove any temporary files and perform a fresh build.
For more information on SPFx web parts and the packaging process, refer to the following resources:
- Microsoft Docs: SPFx Web Parts
- Microsoft Docs: Packaging SPFx Web Parts
- SPFx GitHub Repository
Error[package-solution] No manifests were found in 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure a build has completed successfully
Q&A: Troubleshooting Error[package-solution] No manifests were found in 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure a build has completed successfully
Q: What is the error "Error[package-solution] No manifests were found in 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure a build has completed successfully" and how do I resolve it?
A: The error "Error[package-solution] No manifests were found in 'C:\Users\cloud\LP\Widget\ModernPnP\search-parts/dist'. Ensure a build has completed successfully" occurs when the gulp package-solution
command is unable to find any manifests in the dist
folder. To resolve this error, follow the steps outlined in the previous article: verify that the build has completed successfully, check the manifests, check the configuration files, and run the gulp package-solution
command.
Q: What are the possible causes of this error?
A: The possible causes of this error include:
- Incomplete Build: The build may not have completed successfully, resulting in missing manifests.
- Missing Manifests: The manifests may not be present in the
dist
folder. - Incorrect Configuration: The configuration files may be incorrect or outdated, preventing the
gulp package-solution
command from working correctly.
Q: How do I verify that the build has completed successfully?
A: To verify that the build has completed successfully, run the following command:
gulp build --ship
This command will build the solution and create the necessary files in the dist
folder.
Q: How do I check the manifests?
A: To check the manifests, verify that they are present in the dist
folder and are in the correct format. The manifests should contain the following information:
{
"name": "Widget",
"version": "1.0.0",
"description": "A widget for SharePoint",
"main": "widget.js",
"scripts": {
"start": "gulp start"
},
"dependencies": {
"@microsoft/sp-core-library": "^1.1.1",
"@microsoft/sp-lodash-subset": "^1.1.1"
},
"devDependencies": {
"@microsoft/gulp-core-build": "^1.0.0",
"@microsoft/sp-build-web": "^1.1.1"
}
}
Q: How do I check the configuration files?
A: To check the configuration files, verify that they are correct and up-to-date. The config.json
file should contain the following information:
{
"version": "1.0.0",
"name": "Widget",
"description": "A widget for SharePoint",
"main": "widget.js",
"scripts": {
"start": "gulp start"
},
"dependencies": {
"@microsoft/sp-core-library": "^1.1.1",
"@microsoft/sp-lodash-subset": "^1.1.1"
},
"devDependencies": {
"@microsoft/gulp-core-build": "^1.0.0",
"@microsoft/sp-build-web": "^1.1.1"
}
}
The package-solution.json
file should contain the following information:
{
"name": "Widget",
"version": "1.0.0",
"description": "A widget for SharePoint",
"main": "widget.js",
"scripts": {
"start": "gulp start"
},
"dependencies": {
"@microsoft/sp-core-library": "^1.1.1",
"@microsoft/sp-lodash-subset": "^1.1.1"
},
"devDependencies": {
"@microsoft/gulp-core-build": "^1.0.0",
"@microsoft/sp-build-web": "^1.1.1"
}
}
Q: How do I run the gulp package-solution
command?
A: To run the gulp package-solution
command, use the following command:
gulp package-solution --ship
This command will create a package file that can be uploaded to the SharePoint tenant.
Q: What are some additional troubleshooting tips?
A: Some additional troubleshooting tips include:
- Check the console output: Verify that there are no errors or warnings in the console output.
- Try a clean build: Run the following command to perform a clean build:
gulp clean
gulp build --ship
gulp package-solution --ship
This will remove any temporary files and perform a fresh build.
Q: Where can I find more information on SPFx web parts and the packaging process?
A: For more information on SPFx web parts and the packaging process, refer to the following resources: