0

Can i add multiple webparts in my SPFX project for sharepoint server 2016 - classic pages. All samples are for modern pages like this.

New webpart where i trying to add in my existing project is with another name, but error is:

Cannot create two Web part (on-prem) with the same name

I have following error: enter image description here

Where i install latest version on @microsoft/generator-sharepoint i solving above problem.

Modern Page:

enter image description here

But doesn't work for classic pages.

5
  • Have you noticed that the error message is "Cannot create two Web part (on-prem) with the same name."? Commented Oct 31, 2017 at 18:46
  • Yes, new webpart where i trying to add in existing project is with another name. Commented Nov 1, 2017 at 8:18
  • what version of yeoman are you using ? can you update it to the latest version and check ? Commented Nov 1, 2017 at 8:28
  • yeoman version is - [email protected] Commented Nov 1, 2017 at 8:33
  • Sorry, i meant install the latest version of the sharepoint generator as npm install @microsoft/generator-sharepoint@latest -g and then check Commented Nov 1, 2017 at 8:35

1 Answer 1

1

Looks like the issue has been resolved in the SPFx v1.3.4.

Update the your sharepoint generator to this version to resolve the issue.

To update the generator, use the below command and then run the generator again to create multiple webparts in the same solution:

npm install @microsoft/generator-sharepoint@latest -g 
2
  • The new web part is not displayed on the classic page Commented Nov 1, 2017 at 8:51
  • 1
    I think it will be there in the webpart gallery, can you add it from there ? Commented Nov 1, 2017 at 8:52

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.