Error: EMFILE: too many open files, while deploying react widget.Error: EMFILE: too many open files, while deploying react widget.https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1209709982024-03-28T11:38:33Z2024-03-28T11:38:33ZRE: Error: EMFILE: too many open files, while deploying react widget.Piotr Wochhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1213777162022-03-14T17:48:51Z2022-03-13T23:38:35Z<p>Hi Abraham! I am facing the exact same error in a different context
(trying to build a portlet to publish my Angular app via Liferay). </p>
<p>Were you able to resolve this problem?</p>
<p>I would be grateful if you could please let me know (by responding to
this comment).</p>
<p>Thank you!</p>Piotr Woch2022-03-13T23:38:35ZError: EMFILE: too many open files, while deploying react widget.Abraham Johnhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1209709972021-08-17T15:36:30Z2021-07-21T12:49:36Z<p>I've created a React application and done all necessary steps to
makes the app available as a widget for using on site pages in
Liferay. But when I run the command "<span style="color: blue;">
<i>npm run deploy</i></span>" I'm getting the following error
in cmd :</p>
<p> </p>
<p>
<span style="color: red;">
<em>> my-react-app@1.0.0 deploy C:\Users\.......\React
Applications\my-react-app<br /> > npm run build && lnbs-deploy</em></span></p>
<p>
<br />
<span style="color: red;">
<em>> my-react-app@1.0.0 build C:\Users\.......\React
Applications\my-react-app<br /> > babel --source-maps -d build
src && npm run copy-assets && liferay-npm-bundler</em></span></p>
<p>
<span style="color: red;">
<em>Successfully compiled 19 files with Babel (4981ms).</em></span></p>
<p>
<span style="color: red;">
<em>> my-react-app@1.0.0 copy-assets C:\Users\.......\React
Applications\my-react-app<br /> > lnbs-copy-assets</em></span></p>
<p>
<span style="color: red;">
<em>Project assets copied.</em></span></p>
<p>
<br />
<span style="color: red;">
<em>Error: EMFILE: too many open files, open 'C:\Users\.......\React
Applications\my-react-app\node_modules\babel-preset-liferay-standard\package.json'<br />
at Object.openSync (fs.js:498:3)<br /> at readFileSync
(fs.js:394:35)<br /> at defaultReadPackageSync
(C:\Users\.......\React
Applications\my-react-app\node_modules\resolve\lib\sync.js:49:16)<br />
at loadpkg (C:\Users\.......\React
Applications\my-react-app\node_modules\resolve\lib\sync.js:142:19)<br />
at loadAsFileSync (C:\Users\.......\React
Applications\my-react-app\node_modules\resolve\lib\sync.js:107:19)<br />
at loadAsDirectorySync (C:\Users\.......\React
Applications\my-react-app\node_modules\resolve\lib\sync.js:182:16)<br />
at loadNodeModulesSync (C:\Users\.......\React
Applications\my-react-app\node_modules\resolve\lib\sync.js:194:25)<br />
at Function.resolveSync [as sync] (C:\Users\.......\React
Applications\my-react-app\node_modules\resolve\lib\sync.js:98:17)<br />
at Project.resolve (C:\Users\.......\React
Applications\my-react-app\node_modules\liferay-npm-build-tools-common\lib\project\index.js:226:34)<br />
at Project.toolResolve (C:\Users\.......\React Applications\my-react-app\node_modules\liferay-npm-build-tools-common\lib\project\index.js:280:25)</em></span></p>
<p>
<br />
<span style="color: red;">
<em>npm ERR! code ELIFECYCLE<br /> npm ERR! errno 1<br /> npm ERR!
my-react-app@1.0.0 build: `babel --source-maps -d build src
&& npm run copy-assets &&
liferay-npm-bundler`<br /> npm ERR! Exit status 1<br /> npm
ERR!<br /> npm ERR! Failed at the my-react-app@1.0.0 build
script.<br /> npm ERR! This is probably not a problem with npm.
There is likely additional logging output above.</em></span></p>
<p>
<span style="color: red;">
<em>npm ERR! A complete log of this run can be found in:<br /> npm
ERR!
C:\Users\.......\AppData\Roaming\npm-cache\_logs\2021-07-21T12_02_49_760Z-debug.log<br />
npm ERR! code ELIFECYCLE<br /> npm ERR! errno 1<br /> npm ERR!
my-react-app@1.0.0 deploy: `npm run build &&
lnbs-deploy`<br /> npm ERR! Exit status 1<br /> npm ERR!<br /> npm
ERR! Failed at the my-react-app@1.0.0 deploy script.<br /> npm
ERR! This is probably not a problem with npm. There is likely
additional logging output above.</em></span></p>
<p>
<span style="color: red;">
<em>npm ERR! A complete log of this run can be found in:<br /> npm
ERR! C:\Users\.......\AppData\Roaming\npm-cache\_logs\2021-07-21T12_02_50_229Z-debug.log</em></span></p>
<p> </p>
<p>
<em>I'm using Liferay CE portal tomcat 7.4.0 ga1 bundle on Windows 10.</em>&l