copy-node-modules
copy-node-modules copied to clipboard
No such file or director if address package-name mismatch
Thanks for the useful package! Just what I need.
Apparently yarn and npm use the name from either the dependencies or from the address for the directory in node_modules, while copy-node-modules uses the package's name from it's packages.json.
If the maintainer did a mistake, this will result in copy-node-modules to fail, while yarn and npm work file.
Example:
packages.json
"dependencies": {
"jquery.accessible-accordion": "nomensa/jquery.accessible-accordion",
node_modules/jquery.accessible-accordion/package.json
"name": "jquery-accessible-accordion",
Results in copy-node-modules failing:
$ copy-node-modules
Error: Error: ENOENT: no such file or directory, stat '…/node_modules/jquery-accessible-accordion'
Thanks for having a look.