Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install pure-prompt with npm install! #554

Closed
1 of 2 tasks
shrihankp opened this issue Jul 19, 2020 · 6 comments
Closed
1 of 2 tasks

Cannot install pure-prompt with npm install! #554

shrihankp opened this issue Jul 19, 2020 · 6 comments

Comments

@shrihankp
Copy link

shrihankp commented Jul 19, 2020

General information

System report (output of prompt_pure_system_report): Cannot run it.

Other information

  • Pure version: Cannot install, so no version
  • ZSH version: Latest, as of 19-7-2020
  • Terminal program & version: (e.g. Hyper 1.0.0, iTerm 3.0.0, xterm 327, other?) Cygwin
  • Operating system: (e.g. macOS Mojave 10.13.1) Windows
  • ZSH framework: (e.g. oh-my-zsh, prezto, antigen, antibody, zplug, other?) oh-my-zsh

I have:

  • Tested with another terminal program and can reproduce the issue:
  • Followed the integration instructions for my framework

Problem description

I followed the steps to install using npm install --global pure-prompt but it throws an error in Cygwin + ZSH + OhMyZsh

Reproduction steps

  1. Go to homepage of pure
  2. Run the command npm install --global pure-prompt : copy and paste
  3. Get an error:
> pure-prompt@1.12.0 postinstall C:\Users\AnotherUser.APPLE.000\AppData\Roaming\npm\node_modules\pure-prompt
> PURE_DEST=/usr/local/share/zsh/site-functions npm run --silent postinstall-link && exit 0; PURE_DEST="$PWD/functions" npm run postinstall-link && npm run postinstall-fail-instructions

'PURE_DEST' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pure-prompt@1.12.0 postinstall: `PURE_DEST=/usr/local/share/zsh/site-functions npm run --silent postinstall-link && exit 0; PURE_DEST="$PWD/functions" npm run postinstall-link && npm run postinstall-fail-instructions`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pure-prompt@1.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AnotherUser.APPLE.000\AppData\Roaming\npm-cache\_logs\2020-07-19T10_08_29_841Z-debug.log

Screenshot:

Capture

My .zshrc:

NOTE: I can't install pure so no .zshrc!

@mafredri
Copy link
Collaborator

It looks like the NPM installation scripts aren't behaving like shell scripts as they do on e.g. macOS or Linux systems. Especially the environment variable is being interpreted as a command.

We'd be happy to fix this but unfortunately I don't have a Windows system to test on, and it also needs to work cross-platform. If anyone has any ideas here I'm all ears.

Thoughts on how to fix this:

  • Prefix pure PURE_DEST with the env, but will it be available?
  • Run the commands inside a shell interpreter like Bash, sh, etc, but what's available and guaranteed to work on all platforms?
  • Detect OS and run separate commands, but we still need to figure out what works on Cygwin

For the time being, I would suggest the Manual install method to you.

@shrihankp
Copy link
Author

shrihankp commented Jul 19, 2020

...Prefix pure PURE_DEST with the env, but will it be available?

BTW, How to do that?

@shrihankp
Copy link
Author

And wait, can I install a Node.js version of macOS/Linux to somewhere near Cygwin?

@shrihankp
Copy link
Author

shrihankp commented Jul 19, 2020

So I installed it "MANUALLY". It again throws an error:
Capture
I RESTARTED, ANOTHER ERROR:
(zpty):zpty:15: can't open pseudo terminal: bad file descriptor
async_init:zpty:17: no such pty command: _async_test
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
(zpty):zpty:33: can't open pseudo terminal: bad file descriptor
async_stop_worker:34: maximum nested function level reached; increase FUNCNEST?

@mafredri
Copy link
Collaborator

What does your .zshrc look like? If there's nothing weird going on there, I'm afraid I can't be of much assistance. It looks like Zsh isn't working as it should. I have no experience with Cygwin and it has had issues in the past, see e.g. #439 and #141.

@shrihankp
Copy link
Author

So I installed powerlevel10k and they gave me the pure prompt! I am very happy now because I have a fully beautiful terminal!

$issue_state="closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants