microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.47k stars 242 forks source link

Add node-gyp to peerDependencies #505

Closed daniel-brenot closed 2 years ago

daniel-brenot commented 2 years ago

Environment details

Issue description

When trying to install dependencies for the theia IDE, I get the following message:


# Script name: install

Usage Error: Couldn't find a script name "node-gyp" in the top-level (used by @theia/node-pty@npm:0.9.0-theia.6). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...```

## Issue Solution

Add node-gyp to the peer dependencies for the project
valeriangalliat commented 1 year ago

I'm running into this issue as well.

Looks like https://github.com/microsoft/node-pty/pull/567 introduced a regression by removing the node-gyp dependency.

Tyriar commented 1 year ago

@valeriangalliat it's not meant to be required now according to #567? cc @deepak1556, @rzhao271

valeriangalliat commented 1 year ago

Oh that's right. Looks like node-pty@0.10.1 (latest) on npm still has that install script in package.json somehow! https://socket.dev/npm/package/node-pty/files/0.10.1/package.json#L39 That would explain why this error still happens