`Error: EMFILE, open` when browserifying with coffee-reactify
colvint opened this issue · comments
Hey there,
I'm getting what appears to be a file handle error on the react package.json file when attempting to browserify using coffee-reactify to transform cjsx.
Here's what I'm doing in a fresh directory named coffee-reactify-test
:
In package.json
{
"name": "foo",
"version": "1.0.0",
"description": "Foo project.",
"author": "",
"license": "ISC",
"devDependencies": {
"browserify": "^9.0.3",
"coffee-reactify": "^3.0.0",
"coffee-script": "^1.9.1",
"react": "^0.13.1"
},
"dependencies": {}
}
Run npm install
to install node_modules (Command line)
npm install
Create an app.coffee
file which requires my cjsx widget
Widget = require './widget.cjsx'
Create a widget.cjsx
file which defines my widget
# @cjsx React.DOM
React = require('react')
Widget = React.createClass
render: ->
<div>
My Widget
</div>
module.exports = Widget
Run browserify
with coffee-reactify
transformation (Command line)
browserify -t coffee-reactify --extension=".cjsx" --extension=".coffee" app.coffee > bundle.js
Error
Error: EMFILE, open '/Users/foobar/coffee-reactify-test/node_modules/react/package.json'
Any insight appreciated...
Update: Issue is probably farther up the chain in browserify
itself. Seems OSX file limits make it sad. Although my example is super simple and involves only two requires
, I assume browserify
is opening tons of dependent files under the hood -- thereby pushing the limit.
In any case, running:
ulimit -n 2560
Resolved the issue for me on OSX 10.9.5