I got this error when trying to debug a NextJS app with pnpm:
pnpm: --inspect-publish-uid= is not allowed in NODE_OPTIONS
The Visual Studio Code Javascript debug console sets the environment variable NODE_OPTIONS
to include --inspect-publish-uid=http
, which was causing this failure. The odd part was that the failure persisted even after I had uninstalled every node version except the latest binaries from my system, which should definitely support that flag.
Turns out the answer was just to uninstall pnpm
on the system, which I had installed via the standalone script. Then after a brew install pnpm
again, it was working. pnpm
must have had its own notion of what's valid in NODE_OPTIONS
that was cached somewhere with the install.
Top comments (0)