microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.82k stars 592 forks source link

[rush] spfx and microsoft teams projects not building together with yarn #1625

Open clarktozer opened 4 years ago

clarktozer commented 4 years ago

Is this a feature or a bug?

Please describe the actual behavior. I'm trying to build two projects. One was scaffolded using the spfx yeoman generator, the other using the teams yeoman generator. They are not dependent on one another. The build fails with an error to do with the gulp package in the spfx project. SPFx projects and teams projects use different versions of gulp. If I add multiple spfx webparts without the teams project rush builds them all correctly. Is there anyway I can fix this so rush can build spfx and teams projects successfully?

image

If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate. Install rush, spfx and teams generators

npm install @microsoft/rush -g
npm install generator-teams -g
npm install @microsoft/generator-sharepoint -g

Initialize a rush repo and then add two projects. rush init Add a spfx library component using the yeoman generator yo @microsoft/sharepoint --skip-install Add a teams app using the yeoman generator yo teams --skip-install Add projects to rush.json and run rush commands Add correct yarn version instead of pnpm

rush update
rush build

What is the expected behavior? Builds projects successfully.

If this is a bug, please provide the tool version, Node.js version, and OS.

octogonz commented 4 years ago

Note for repro:

This:

npm install @microsoft/sharepoint -g

Should be this:

npm install @microsoft/generator-sharepoint -g
clarktozer commented 4 years ago

Thanks, have updated.

octogonz commented 4 years ago

I took a quick look today. This is going to be a fun one... 😊 Teams and SharePoint have rather inconsistent dependencies versions, whereas normally Rush tries to keep everything consistent across the monorepo. Also, both these projects have broken peer dependencies.

This is a great use case, though. I'll see if I can get it working and then share a branch.

clarktozer commented 4 years ago

Thanks. Yeah I tried playing around with different versions of gulp/gulp-cli to try force it to use the correct one, no real progress there. Broken peer dependencies get worse when adding various @SharePoint packages!

stevebeauge commented 2 years ago

Hello,

Any progress?