You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using workspaces, all node modules are located in a single node_modules folder in the root of a project. Nested packages are able to reference to installed dependencies due to the way how Node.js resolves imports, basically looking at parent folders for node_modules. When a nested package (workspace) depends on a tool with CLI, Yarn creates symlinks to .bin folder files from the root modules folder.
What is the expected behavior?
Several tools (i.e. facebook/create-react-app#3031, facebook/flow#5107) need additional work to be done to support workspaces which breaks user experience when they trying to adopt workspaces in their projects. I can imagine even more tools have possible issues with workspaces, either not discovered or not reported yet.
Current proposal is to make symlink to whole node_modules folder in workspaces, instead of just symlinking CLIs. In this way, zero tools would need to make additional changes only in favor of supporting workspaces. It immediately allows the use of Flow and CRA (current versions) with workspaces.
Please mention your node.js, yarn and operating system version.
I use Yarn 1.3.2 with Node.js 8.9 on macOS 10.12.
The text was updated successfully, but these errors were encountered:
And so any change I do in lib isn't reflected in workspace-1.
I have to delete the workspace level packages for it to work as expected.
Expectation:
I guess it isn't required to place the workspace dependencies under sub directory node_modules.
Even if it is the case for some reason they should be symlinked.
yarn 1.5.1 just released the new feature nohoist, which should be able to make react and react-native experience much simpler. Feel free to give it a try. examples available here.
Do you want to request a feature or report a bug?
Improvement for existing feature
What is the current behavior?
When using workspaces, all node modules are located in a single
node_modules
folder in the root of a project. Nested packages are able to reference to installed dependencies due to the way how Node.js resolves imports, basically looking at parent folders fornode_modules
. When a nested package (workspace) depends on a tool with CLI, Yarn creates symlinks to.bin
folder files from the root modules folder.What is the expected behavior?
Several tools (i.e. facebook/create-react-app#3031, facebook/flow#5107) need additional work to be done to support workspaces which breaks user experience when they trying to adopt workspaces in their projects. I can imagine even more tools have possible issues with workspaces, either not discovered or not reported yet.
Current proposal is to make symlink to whole
node_modules
folder in workspaces, instead of just symlinking CLIs. In this way, zero tools would need to make additional changes only in favor of supporting workspaces. It immediately allows the use of Flow and CRA (current versions) with workspaces.Please mention your node.js, yarn and operating system version.
I use Yarn 1.3.2 with Node.js 8.9 on macOS 10.12.
The text was updated successfully, but these errors were encountered: