Friday, 12 May 2017

Yarn: Tell yarn to accept certain existing packages as-is without trying to download?

I have some private packages checked-in to my git repo under node_modules/@sparebytes/... and those packages are dependencies in my main app. Since those packages aren't on NPM, I'd like Yarn to just accept whatever is already there but when I run yarn install, it complains with this:

Request failed "404 Not Found"

Edit: I know it's possible to use relative file paths for the dependency (eg "@sparebytes/widgit": "file:node_modules/@sparebytes/widget) but there are complications when widget has a dependency on another package.

Take this structure - node_modules - @sparebytes - util - widget1 (depends on util, so util will get copied into here on install)



via sparebytes

No comments:

Post a Comment