-
Notifications
You must be signed in to change notification settings - Fork 86
Support for Yarn portal
dependencies
#82
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
Comments
Hi @rayshan, Thanks for sharing this. The core problem here is that we currently don't support Yarn-specific A workaround in your case could be to |
Thanks @ehmicky. |
The plugin is using |
I did:
So you're right about the root cause being portal dependencies. |
portal
dependencies
portal
dependenciesportal
dependencies
Looking at Yarn migration guide, it seems like this is the reason why you need this setup, correct? Would adding |
@rayshan did changing the base directory and having next installed as a regular dependency in the web/package.json resolve this for you? |
Hi @rayshan , I created a test monorepo with the following structure to try and mirror what you mentioned above:
By setting the From the tests I was running, I suspect that because you had needed to specify that
which is why setting the If for some reason that still doesn't resolve your issue (perhaps because the yarn version installed tends to be v1 by default though my tests are showing that the portal dependency is correctly resolving with this environment variable alone), you can also set the yarn version explicitly by setting a I hope this helps! |
Since it's been a couple of weeks since my previous message, I'm going to close this issue due to inactivity. If you continue to run into issues and my notes above didn't help resolve them, feel free to reopen this. |
Hi! I think the logic that detects whether next.js is installed should go through all the
package.json
's in a monorepo's packages.For my project here, I'm using yarn v2 berry pnp to manage a monorepo. There are 2 packages:
packages/common
, containing shared components.packages/web
, the app to build, depends on next.js and the above package via"@finance-apps/common": "portal:../common"
.Here are my build settings:
This doesn't work because the root
package.json
doesn't depend on next.js. Changing the base directory in Netlify topackages/web
doesn't work because we need yarn 1 to install yarn 2, and yarn 1 doesn't recognize portal dependencies.The text was updated successfully, but these errors were encountered: