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

MaxListenersExceededWarning tips #2277

Closed
ken30huang opened this issue Nov 13, 2018 · 15 comments
Closed

MaxListenersExceededWarning tips #2277

ken30huang opened this issue Nov 13, 2018 · 15 comments
Labels
🐛 Bug Stale Inactive issues

Comments

@ken30huang
Copy link

ken30huang commented Nov 13, 2018

❔ Question

I use react16.x and parcel develop my project,when running parcel server , there is some message output to CMD window:
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 buildEnd listeners added. Use emitter.setMaxListeners() to increase limit

And project still working , but some times is normal , nothing output

Please help

🔦 Context

My package.json file:

{
	"name": "qfd_offical",
	"version": "1.0.0",
	"description": "",
	"main": "index.js",
	"scripts": {
		"test": "echo \"Error: no test specified\" && exit 1",
		"start": "parcel index.html product.html solution.html service.html aboutus.html case.html case_detail.html newsDetail.html --no-cache",
		"build": "parcel build index.html product.html solution.html service.html aboutus.html case.html case_detail.html newsDetail.html --no-cache --out-dir build/public --public-url ./public"
	},
	"keywords": [],
	"author": "",
	"license": "ISC",
	"dependencies": {
		"assets": "^3.0.0",
		"react": "^16.6.0",
		"react-dom": "^16.6.0"
	},
	"devDependencies": {
		"babel-core": "^6.26.3",
		"babel-preset-env": "^1.7.0",
		"babel-preset-react": "^6.24.1",
		"cssnano": "^4.1.7"
	}
}

💻 Code Sample

🌍 Your Environment

Software Version(s)
Parcel 1.10.3
Node v8.11.1
npm/Yarn 5.6.0
Operating System Windows
@DeMoorJasper
Copy link
Member

DeMoorJasper commented Nov 13, 2018

Are you using any parcel plugins?

Sent with GitHawk

@ken30huang
Copy link
Author

Are you using any parcel plugins?

Sent with GitHawk

I don't use any parcel plugins , you can see package.json

@JelleHol
Copy link

JelleHol commented Nov 23, 2018

I'm also having this problem - Parcel just randomly starts rebuilding everything, showing this warning in the console. It might be Node-related, because all running instances of Parcel do it at exactly the same time.

Furthermore, it outputs multiple "Built in X ms" messages when it's done, showing impossibly short building times (<100 ms).

I'm using Windows 10. Teammates on MacOS are not having this issue.

Edit: same Parcel version, same React version, not using any plugins

@ol-web
Copy link

ol-web commented Nov 24, 2018

this often happens after leaving parcel running idle for a while. the next time you save a watched file parcel goes crazy with rebuilding.

i'm also on node 8.11. perhaps someone could jump a few node versions up and down to see if that's the cause of the problem.

@JelleHol
Copy link

Just confirmed this happens also with node 9.10.1 and 10.12.0

@ken30huang
Copy link
Author

Just confirmed this happens also with node 9.10.1 and 10.12.0

GOOD

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Nov 28, 2018

Anyone who has an example project ? Because I’ve never experienced this

Sent with GitHawk

@ken30huang
Copy link
Author

Anyone who has an example project ? Because I’ve never experienced this

Sent with GitHawk

OK , get it. I will let you know when I sent.

@alidcast
Copy link

alidcast commented Jan 4, 2019

recently gave another attempt at integrating rogue with Parcel. it's running a lot smoother now, but this is one of the issues i am experiencing. Not sure if it's related to running two bundles at the same time for server side rendering. @DeMoorJasper you didn't see this at all with blazingly?

also seeing running into random infinite loops during HMR #1317

the setup for Rogue is pretty minimal https://github.com/alidcastano/rogue.js/blob/master/packages/cli/lib/bundle.js (see lines 47 / 77)

@DeMoorJasper
Copy link
Member

@alidcastano Not sure what is causing this issue.
I haven't had any issues with Blazingly, except with 2 bundlers using the same workerfarm and having conflicts with config (see #1903 )

I haven't worked on Blazingly for a little while but will completely rewrite it once the various design bugs in Parcel gets fixed, so once Parcel 2 is in Alpha/released.

I've also had the HMR bug, haven't had time to look into this or contribute much to Parcel lately. It's also pretty hard to debug due to chrome crashing whenever that happens.

@alidcast
Copy link

alidcast commented Jan 5, 2019

@DeMoorJasper I'm on windows, so issue might be specific to environment then given comments on issue.

Do you have an estimate on when Parcel 2 will be alpha released?

@DeMoorJasper
Copy link
Member

@alidcastano it might be a windows issue not sure, as you can see in the issue the cause has never been discovered.

I don't know when the alpha is gonna be released. You can follow progress here: #2218

@JelleHol
Copy link

JelleHol commented Jan 15, 2019

My hunch is that it has something to do with this issue in chokidar: #750

How so? Well, I discovered that my own chokidar file watcher spewed out lots of file changes every time I ran a search or Git refresh in vscode. So I tried a temporary fix as suggested in that thread:

Running this command as administrator did the trick:
fsutil behavior set disablelastaccess 1

@JelleHol
Copy link

So I've been working for a while with file access disabled, and this problem has not occurred anymore. However, I am having a hard time reproducing this behavior in another repository (with it enabled of course). It only seems to happen in very large projects with many dependencies and files.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

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

No branches or pull requests

6 participants
@DeMoorJasper @ken30huang @JelleHol @alidcast @ol-web and others