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

Support yarn hoisted packages in a workspace context #4667

Closed
easadev opened this issue May 31, 2019 · 0 comments
Closed

Support yarn hoisted packages in a workspace context #4667

easadev opened this issue May 31, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@easadev
Copy link
Contributor

easadev commented May 31, 2019

Is your feature request related to a problem? Please describe.

nativescript already supports yarn (which is nice). Yarn has a feature called workspaces (https://yarnpkg.com/en/docs/workspaces), however, a nativescript app does not work under a workspace context, because yarn hoists common package and nativescript has a fixed mechanism to look up for package.json files inside its relative node_modules.

Describe the solution you'd like

Ideally, nativescript should use node modules resolution algorithm to look up for those package.json files.

Describe alternatives you've considered

Additional context

/my-monorepo
--/node_modules
----/@angular/*
--/my-nativescript-app
----package.json
----/node_modules
------/nativescript-*
--/my-webapp
----package.json
----/node_modules
------/bootstrap

This is how a workspace looks like in yarn. since "my-webapp" and "my-nativescript-app" both use same @angular/* version, yarn hoists these packages.. this conflicts with nativescript, since in the build process it will check for a my-nativescript-app/node_modules/@angular/core/package.json file, and since this is no longer the case, the app does does not build.

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

No branches or pull requests

3 participants