microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.43k stars 232 forks source link

Install error #558

Closed janek515 closed 1 year ago

janek515 commented 1 year ago

Environment details

Issue description

When installing (using yarn) a build error appears

# This file contains the result of Yarn building a package (node-pty@npm:0.10.1)
# Script name: install

Usage Error: Couldn't find a script name "node-gyp" in the top-level (used by node-pty@npm:0.10.1). 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> ...

Running yarn add node-gyp fixes the problem

UPL123 commented 1 year ago

I think you need to install node-gyp. You can install it using

yarn add node-gyp
daniel-brenot commented 1 year ago

Can we close this? The answer was given.

janek515 commented 1 year ago

The point is you shouldn't need to install it manually

daniel-brenot commented 1 year ago

The point is you shouldn't need to install it manually

Then this most likeley should have node-pty added to the peer dependencies.

Tyriar commented 1 year ago

This is already called out in the readme that you need to install some build tools on Windows: https://github.com/microsoft/node-pty#windows