Skip to content

Does not work with yarn workspaces #23

@hayes

Description

@hayes

Currently denoify does not work well with packages inside yarn workspaces because modules are mostly hoisted into the root node_modules directory.

getInstalledVersionPackageJsonFactory can't find these packages when they are hoisted.

One way to fix this would be to use require.resolve instead by doing something like:

return require.resolve(nodeModuleName, {paths: [projectPath]}).replace(/^(.*\/node_modules\/[^/]*).*/, '$1');

insttead of

return st.find_module_path(nodeModuleName, projectPath);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions