### shellEmulator * Default: **false** * Type: **Boolean** When `true`, pnpm will use a JavaScript implementation of a [bash-like shell] to execute scripts. This option simplifies cross-platform scripting. For instance, by default, the next script will fail on non-POSIX-compliant systems: ```json title="package.json" "scripts": { "test": "NODE_ENV=test node test.js" } ``` But if the `shellEmulator` setting is set to `true`, it will work on all platforms. Since v11.28.1, a configured non-empty `scriptShell` wins over `shellEmulator` for `pnpm run` and lifecycle scripts. The emulator runs only when `scriptShell` is unset or empty. :::note Node.js 22 or higher supports running scripts without pnpm's assistance. For the example above, you can run the `test` script with `node --run test`. However, the `shellEmulator` option has no effect on this. Scripts that depend on POSIX features are required to be run `pnpm run` instead of `node --run` to work in non-POSIX-compliant environments. ::: [bash-like shell]: https://www.npmjs.com/package/@yarnpkg/shell