yarn node — Yarn CLI reference
Run a Node.js process within the project's environment
Docs/Reference/CLI/node
yarn node
Run a Node.js process within the project's environment
yarn node <ARGS…>
This command runs Node.js with the current project’s environment, including Plug’n’Play injection when the project uses PnP.
Examples#
Run a Node script
yarn node ./my-script.js
Evaluate a script with access to the project dependencies
yarn node -e "console.log(require.resolve('lodash'))"