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

"No such file" error #5

Closed
sendrecv opened this issue Jun 5, 2018 · 12 comments
Closed

"No such file" error #5

sendrecv opened this issue Jun 5, 2018 · 12 comments
Labels
help wanted Extra attention is needed

Comments

@sendrecv
Copy link

sendrecv commented Jun 5, 2018

After npm install hiper -g, hiper baidu.com throws this exception:

/usr/bin/env: 'node --no-warnings': No such file or directory

I'm currently running Node 10 with nvm on Manjaro (Arch) Linux.

@pod4g
Copy link
Owner

pod4g commented Jun 5, 2018

Hi, May be you should run sudo ln -s /usr/bin/nodejs /usr/bin/node

@sendrecv
Copy link
Author

sendrecv commented Jun 5, 2018

I think it must be something else. That command returns an error because /usr/bin/node already exists. I currently have node installed with both pacman (because it's a dependency of some locally installed apps like atom) and with nvm, so when I run which node it returns:

/home/sendrecv/.nvm/versions/node/v10.3.0/bin/node

@pod4g
Copy link
Owner

pod4g commented Jun 5, 2018

Try which env and type /usr/bin/env. Then run /usr/bin/env node.

@danner26
Copy link

danner26 commented Jun 5, 2018

Same issue here, node 10. The env is set properly (I think) and both /usr/bin/env and /usr/bin/env node work by themselves, but not when running hiper

@pod4g pod4g added the help wanted Extra attention is needed label Jun 6, 2018
@pseudolog
Copy link

Hi, was just gonna report that myself. The problem lies within your shebang.

#! /usr/bin/env node --no-warnings

Linux (unlike BSD it seems) doesn't support more than one argument to the shebang command. (Details)

Get rid of the --no-warnings argument and it should function properly. node added support for a NODE_NO_WARNINGS environment variable. Maybe use that as a workaround?

@danner26
Copy link

danner26 commented Jun 6, 2018

@pseudolog has it right, remove the --no-warnings and it will work correctly

and I agree with the NODE_NO_WARNINGS env variable as a work around, I think that would be the best course of action

@pod4g
Copy link
Owner

pod4g commented Jun 6, 2018

@pseudolog Well done!!!!

@pod4g
Copy link
Owner

pod4g commented Jun 6, 2018

Hi guys.

I change the code of hiper/src/index.js as follow. The warning message will still appear

#! /usr/bin/env node
process.env.NODE_NO_WARNINGS = 1

Can someone help me?

@zhiyan
Copy link
Contributor

zhiyan commented Jun 7, 2018

Maybe add a shell wrapper, instead of excute the index.js directly.

@pseudolog
Copy link

I guess the cleanest solution would be to actually handle those promise rejections. Otherwise there's process.removeAllListeners('warning')

@pod4g
Copy link
Owner

pod4g commented Jun 8, 2018

@zhiyan Please give me more details. what should i do?

zhiyan added a commit to zhiyan/hiper that referenced this issue Jun 8, 2018
zhiyan added a commit to zhiyan/hiper that referenced this issue Jun 8, 2018
@zhiyan zhiyan mentioned this issue Jun 8, 2018
pod4g added a commit that referenced this issue Jun 8, 2018
@pod4g pod4g closed this as completed Jun 8, 2018
@pod4g
Copy link
Owner

pod4g commented Jun 8, 2018

The problem has been solved, please upgrade hiper to 0.0.15

run below to upgrade:

npm i hiper -g

thr pr: #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants