Message Boards

Error: EMFILE: too many open files, while deploying react widget.

Abraham John, modified 2 Years ago.

Error: EMFILE: too many open files, while deploying react widget.

New Member Posts: 2 Join Date: 7/9/21 Recent Posts

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  " npm run deploy" I'm getting the following error in cmd :

 

> my-react-app@1.0.0 deploy C:\Users\.......\React Applications\my-react-app
> npm run build && lnbs-deploy


> my-react-app@1.0.0 build C:\Users\.......\React Applications\my-react-app
> babel --source-maps -d build src && npm run copy-assets && liferay-npm-bundler

Successfully compiled 19 files with Babel (4981ms).

> my-react-app@1.0.0 copy-assets C:\Users\.......\React Applications\my-react-app
> lnbs-copy-assets

Project assets copied.


Error: EMFILE: too many open files, open 'C:\Users\.......\React Applications\my-react-app\node_modules\babel-preset-liferay-standard\package.json'
    at Object.openSync (fs.js:498:3)
    at readFileSync (fs.js:394:35)
    at defaultReadPackageSync (C:\Users\.......\React Applications\my-react-app\node_modules\resolve\lib\sync.js:49:16)
    at loadpkg (C:\Users\.......\React Applications\my-react-app\node_modules\resolve\lib\sync.js:142:19)
    at loadAsFileSync (C:\Users\.......\React Applications\my-react-app\node_modules\resolve\lib\sync.js:107:19)
    at loadAsDirectorySync (C:\Users\.......\React Applications\my-react-app\node_modules\resolve\lib\sync.js:182:16)
    at loadNodeModulesSync (C:\Users\.......\React Applications\my-react-app\node_modules\resolve\lib\sync.js:194:25)
    at Function.resolveSync [as sync] (C:\Users\.......\React Applications\my-react-app\node_modules\resolve\lib\sync.js:98:17)
    at Project.resolve (C:\Users\.......\React Applications\my-react-app\node_modules\liferay-npm-build-tools-common\lib\project\index.js:226:34)
    at Project.toolResolve (C:\Users\.......\React Applications\my-react-app\node_modules\liferay-npm-build-tools-common\lib\project\index.js:280:25)


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-react-app@1.0.0 build: `babel --source-maps -d build src && npm run copy-assets && liferay-npm-bundler`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-react-app@1.0.0 build 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\.......\AppData\Roaming\npm-cache\_logs\2021-07-21T12_02_49_760Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-react-app@1.0.0 deploy: `npm run build && lnbs-deploy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-react-app@1.0.0 deploy 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\.......\AppData\Roaming\npm-cache\_logs\2021-07-21T12_02_50_229Z-debug.log

 

I'm using Liferay CE portal tomcat 7.4.0 ga1 bundle on Windows 10.

Please help me on this.

Piotr Woch, modified 2 Years ago.

RE: Error: EMFILE: too many open files, while deploying react widget.

New Member Posts: 3 Join Date: 3/10/22 Recent Posts

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). 

Were you able to resolve this problem?

I would be grateful if you could please let me know (by responding to this comment).

Thank you!