diff --git a/src/package-linker.js b/src/package-linker.js index d74c4ea0a7..3a96f1336c 100644 --- a/src/package-linker.js +++ b/src/package-linker.js @@ -436,7 +436,12 @@ export default class PackageLinker { topLevelDependencies, async ([dest, {pkg}]) => { if (pkg._reference && pkg._reference.location && pkg.bin && Object.keys(pkg.bin).length) { - const binLoc = path.join(this.config.lockfileFolder, this.config.getFolder(pkg)); + let binLoc; + if (this.config.modulesFolder) { + binLoc = this.config.modulesFolder; + } else { + binLoc = path.join(this.config.lockfileFolder, this.config.getFolder(pkg)); + } await this.linkSelfDependencies(pkg, dest, binLoc); tickBin(); }