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
In general, --modules-folder does not work right when the path does not end in node_modules.
But even if it does, yarn still skips creating $MODULES_FOLDER/.bin completely, creating ./node_modules/.bin instead.
(Also also, yarn.lock gets updated in ./ and not $MODULES_FOLDER/.., which may or may not be a bug.)
$ yarn --version
1.9.4
$ rm -rf node_modules
$ yarn --modules-folder=/tmp/test/node_modules
(...no errors)
$ ls -a node_modules/
. .. .bin
$ ls -a /tmp/test/node_modules/.bin
ls: cannot access '/tmp/test/node_modules/.bin': No such file or directory
Maybe what's really missing is something more granular, like yarn --path-source './package.json' --path-lock '/tmp/test/yarn.lock' --modules-folder '/tmp/test/node_modules' --bin-folder '/tmp/test/node_modules/.bin but OTOH all I really wish for is yarn --from './package.json' --to '/tmp/test'
@danielrentz my understanding is that many (most?) packages depend on the modules directory having the name "node-modules."
Not sure what you're trying to accomplish, but if you're trying to keep certain folders from your published product, you might trying a filter according to your syncronization process (eg rsync).
As a tangential point, I don't want to waste resources syncing module folders to iCloud. Luckily, iCloud ignores all directories with the suffix "noSync."
For example, my project's .yarnrc uses this directives: --modules-folder "./node-modules.noSync/node_modules". Works nicely, though requires a bit more effort to scaffold a project.
Do you want to request a feature or report a bug?
Bug report
What is the current behavior?
Cannot install packages with binary code to custom modules directory.
If the current behavior is a bug, please provide the steps to reproduce.
fails with
Yarn creates a
test
directory with dependencies of bcrypt, and anode_modules
directory with a.bin
subdir containingnode-pre-gyp
.What is the expected behavior?
bcrypt builds and installs into the
test
directory.Please mention your node.js, yarn and operating system version.
node v8.11.1
yarn v1.9.4
Windows 10
The text was updated successfully, but these errors were encountered: