May 2025posted on 05.10.2025Use pnpm's shell-emulator to execute scripts on all platforms pnpm can do cross-platform scripting when shell-emulator is enabled. # .npmrc shell-emulator=true It means scripts like this will work across all platforms: "scripts": { "serve": "NODE_ENV=production node server" } It is powered by @yarnpkg/shell and it replaces the need to use libraries like cross-env. Learn More shell-emulator pnpm/pnpm#2881 @pnpm/npm-lifecycle No reactions yet
Use pnpm's shell-emulator to execute scripts on all platforms
pnpm can do cross-platform scripting when shell-emulator is enabled.
It means scripts like this will work across all platforms:
It is powered by @yarnpkg/shell and it replaces the need to use libraries like
cross-env.Learn More