5

I'm building something that needs to call yarn from within a node program itself, is this possible? I've not found anything reasonable online besides calling yarn install by using child_process and calling the shell command.

While I know this will work, I'd rather have a way to call the Yarn API directly from within my node application, how can I do something like this?

tk421
  • 5,775
  • 6
  • 23
  • 34
JP Silvashy
  • 46,977
  • 48
  • 149
  • 227
  • 2
    Not currently. See issues [#906](https://github.com/yarnpkg/yarn/issues/906) and [#4514](https://github.com/yarnpkg/yarn/issues/4514). – Tamlyn Oct 04 '18 at 11:07
  • Does this answer your question? [How to run \`yarn tag\` programmatically from node.js?](https://stackoverflow.com/questions/54250231/how-to-run-yarn-tag-programmatically-from-node-js) – axmrnv Feb 14 '20 at 20:36
  • No, I think I want to avoid calling exec or sending shell commands, want to interact directly with yarn. – JP Silvashy Feb 18 '20 at 16:00

0 Answers0