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
For a bit of context: I recently started fiddling with converting a couple of my projects to a monorepo using yarn workspaces. One of the downstream dependencies of one of my addons is ember-cli-dropzonejs.
I am getting an error when trying to resolve the dropzone dependency, I believe originating from treeForVendor and treeForStyles, which use this.project.root as the directory root when including dropzone in the vendor tree. Since dependencies are hoisted to the parent of the workspace, dropzone cannot be resolved and the following error is given:
Directory not found: /path/to/parent/workspace-a/node_modules/dropzone/dist/min
Description
For a bit of context: I recently started fiddling with converting a couple of my projects to a monorepo using yarn workspaces. One of the downstream dependencies of one of my addons is ember-cli-dropzonejs.
I am getting an error when trying to resolve the
dropzone
dependency, I believe originating fromtreeForVendor
andtreeForStyles
, which usethis.project.root
as the directory root when including dropzone in the vendor tree. Since dependencies are hoisted to the parent of the workspace, dropzone cannot be resolved and the following error is given:Directory not found: /path/to/parent/workspace-a/node_modules/dropzone/dist/min
ember-cli-dropzonejs/index.js
Lines 14 to 17 in 7e26e6c
Project layout, in case it is useful
Proposal
Use
require.resolve
to locate the neededdropzone
dependency. This should follow the expected resolution whether in a workspace or not. Inspiration taken from ember-highcharts:https://github.com/ahmadsoe/ember-highcharts/blob/4a326f0528bcf6236e18fa44ebbe30a185dc271d/index.js#L86-L98
Example:
https://github.com/daniellubovich/ember-cli-dropzonejs/blob/a83b70dd7d36c415b3b196520668eccd46dcbd69/index.js#L14-L17
The text was updated successfully, but these errors were encountered: