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

Setting file descriptor limits fails on Windows #257

Closed
spyalert01 opened this issue Sep 8, 2015 · 8 comments
Closed

Setting file descriptor limits fails on Windows #257

spyalert01 opened this issue Sep 8, 2015 · 8 comments

Comments

@spyalert01
Copy link

When I run npm install for todo examples,
I get the following error: --> '[' is not recognized as an internal or external command,

C:\Users\User\nodejs\relaymaster\examples\todo>npm i
|


> [email protected] prepublish C:\Users\User\nodejs\relaymaster
> npm run build

/
> [email protected] build C:\Users\User\nodejs\relaymaster
> [ $(ulimit -n) -lt 4096 ] && ulimit -n 4096; gulp

'[' is not recognized as an internal or external command,
operable program or batch file.
\
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Users\\User\\nodejs\\\\node.exe" "C:\\Users\\User\\nodejs\\n
de_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `[ $(ulimit -n) -lt 4096 ] && ulimit -n 4096;
gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script '[ $(ulimit -n) -lt 4096
 && ulimit -n 4096; gulp'.
npm ERR! This is most likely a problem with the react-relay package,
npm ERR! not with npm itself.
ERR! Tell the author that this fails on your system:
npm ERR!     [ $(ulimit -n) -lt 4096 ] && ulimit -n 4096; gulp
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-relay
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\User\nodejs\relaymaster\npm-debug.log
-
npm ERR! addLocalDirectory Could not pack C:\Users\User\nodejs\relaymaster to C```
@clentfort
Copy link

I looks like the command is failing because there is some bash-script before the actual command, which the windows command line does not supprt.
You could try to run gulp from your command line instead of npm run build.

@wincent
Copy link
Contributor

wincent commented Sep 8, 2015

Thanks for reporting the issue, @spyalert01. Looks like this is happening on Windows where the shell doesn't have a [ (test) command. I wouldn't be surprised if the ulimit call would fail in any case, even if [ weren't an issue.

I don't have a Windows install right now to test a fix, but will look into getting one. In the meantime, if you beat me to a PR we'd be happy to accept one.

@spyalert01
Copy link
Author

@clentfort
I am not even doing the npm run build yet. I am only doing npm install and that message already popup.
and How to Gulp? sorry. I am only familiar with npm. I am a newbie

@spyalert01
Copy link
Author

@wincent
sorry, what do you mean by beat you to a PR?

@kassens
Copy link
Member

kassens commented Sep 9, 2015

@spyalert01: He meant that if you want to work on a pull request (PR) before he's able to get access to a Windows install, we're all happy to accept that contribution.

@zpao
Copy link
Member

zpao commented Sep 9, 2015

We might actually not need the ulimit bit anymore now that we're past node 0.10 (apparently nodejs/node-v0.x-archive@6820054 was in node 0.12 so is probably still around in v3, v4)

@wincent
Copy link
Contributor

wincent commented Sep 9, 2015

Cool. If we do end up keeping it, we'd need to get rid of the ; as Windows doesn't grok that. It does, however, grok &&, but we'd still need to work around ulimit not existing on Windows (not sure how, as it doesn't have which either... probably need to wrap it up in a separate script that we call with node).

@steveluscher steveluscher changed the title Not able to install TODO Examples Setting file descriptor limits fails on Windows Sep 11, 2015
steveluscher added a commit that referenced this issue Sep 16, 2015
Summary: Should ameliorate #257.
Closes #322

Reviewed By: @josephsavona

Differential Revision: D2446603
@steveluscher
Copy link
Contributor

The ulimit command is gone as of #322. Feel free to open a new issue if you encounter any more problems on Windows!

steveluscher added a commit that referenced this issue Sep 18, 2015
Summary: Should ameliorate #257.
Closes #322

Reviewed By: @josephsavona

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

No branches or pull requests

6 participants