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

PnP controls throwing error in SPFx webpart created using Teams Toolkit. #1774

Open
manuhinCCS opened this issue Feb 26, 2024 · 2 comments
Open

Comments

@manuhinCCS
Copy link

I am getting below error while adding PnP Dragdrop control in the Teams toolkit SPFx webpart.
image

Is PnP controls supports SPFx web parts solutions created using Teams Toolkit?

Category

[ ] Bug

[ ] Question

Code:
import { DragDropFiles } from "@pnp/spfx-controls-react/lib/DragDropFiles";

private _getDropFiles = (files: any[]) => {
for (var i = 0; i < files.length; i++) {
console.log("Filename: " + files[i].name);
console.log("Path: " + files[i].fullPath);
}
}

{"Upload document..."}

{/* Specify the components to load where Drag and drop area should work */}

Version

Please specify what version of the library you are using: [ "@pnp/spfx-controls-react": "3.17.0" ]
node: v14.20.0
gulp CLI version: 2.3.0
microsoft/generator-sharepoint: 1.18.1

Thanks!

@ghost
Copy link

ghost commented Feb 26, 2024

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

@ghost ghost added the Needs: Triage 🔍 label Feb 26, 2024
@michaelmaillot
Copy link
Collaborator

Hi @manuhinCCS,

From what I know, Teams Toolkit is creating a SPFx project with a specific version, nothing different than what you could create on your side with the original SPFx scaffolding.

However, the PnP Controls version 3.17.0 relies on SPFx version 1.18.2. You should update the PnP Control to the version of SPFx you're using.

Did you have the chance to update the Controls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants