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

jscpd exited with an error code ENOBUFS #519

Open
umair2602 opened this issue Mar 30, 2022 · 1 comment
Open

jscpd exited with an error code ENOBUFS #519

umair2602 opened this issue Mar 30, 2022 · 1 comment

Comments

@umair2602
Copy link

This error came when I created new app in monorepo by using this command:
yarn nx generate @nrwl/react-native:app mobile

Screen Shot 2022-03-30 at 3 08 31 PM

I followed these instructions to solve this but I'm still facing the same.
sudo su to get root prompt, then:

echo 'vm.max_map_count=262144' | sudo tee -a /etc/sysctl.conf && sysctl -w vm.max_map_count=262144
echo 'vm.swappiness=1' | sudo tee -a /etc/sysctl.conf && sysctl -w vm.swappiness=1
echo 'fs.file-max=1048576' | sudo tee -a /etc/sysctl.conf && sysctl -w fs.file-max=1048576
echo 'fs.inotify.max_user_watches=1048576' | sudo tee -a /etc/sysctl.conf && sysctl -w fs.inotify.max_user_watches=1048576
echo -e '\n* soft nproc 1048576\n* hard nproc 1048576\n* soft nofile 1048576\n* hard nofile 1048576' >> /etc/security/limits.conf
echo -e '\nroot soft nproc 1048576\nroot hard nproc 1048576\nroot soft nofile 1048576\nroot hard nofile 1048576' >> /etc/security/limits.conf

Then reboot

My jscpd file content is here:

import { execSync } from 'child_process';
// execute jscpd
try {
  console.log("Running jscpd...")
  execSync("yarn jscpd . --reporters json") // we should really run without invoking yarn
  console.log("jscpd finished successfully!")
} catch (e) {
  console.log("jscpd exited with an error code", e.code)
}

How can I resolve this error?

@kucherenko
Copy link
Owner

Thank you for the report, will try to reproduce the issue and fix it

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

No branches or pull requests

2 participants