Multiple package definitions error
Opened this issue · 6 comments
W20240223-14:23:38.579(2)? (STDERR) ⚡ Detected multiple package definitions within eventemitter3! Please report this to https://github.com/JorgenVatle/meteor-vite/issues
W20240223-14:23:38.580(2)? (STDERR) ⚡ Package ostrio:files was defined within eventemitter3 🤔
I get the above error and the frontend will not load. It says to report this issue here.
Hey there! 👋
What version of meteor-vite
and jorgenvatle:vite-bundler
are you using? If you could set up a project reproducing the issue, that would be tremendously helpful. 🙌
Just following up, are you still having issues with this?
I'm having the exact same issue regarding the ostrio:files package. I tried to recreate the issue in an empty project, but I'm not able to for some reason. I tried installing all the same packages as my private project, but it still runs without issues. I have tried meteor reset
and removed node_modules etc without any luck in my private project.
Did anyone else find a solution regarding this package?
Strangely enough I'm not having this issue on the meteor-vite 1.10.4 and jorgenvatle:vite-bundler@2.0.3.
But when I'm updating to meteor-vite "^2.0.0-next.1" and jorgenvatle:vite-bundler@3.0.0-meteor3.next.11 the issue starts.
I would be available for quick call or help in another way to find a solution for this issue.
Hey there.
If you're able to, could you send me the full stack traces and error messages so I can have a closer look? 🙏
Hi,
I was able to reproduce it by importing the file collection on the client side and after loading the page in the browser.
I still have some error traces here:
W20241003-17:19:15.082(2)? (STDERR) ⚡ Detected multiple package definitions within eventemitter3! Please report this to https://github.com/JorgenVatle/meteor-vite/issues
W20241003-17:19:15.082(2)? (STDERR) ⚡ Package ostrio:files was defined within eventemitter3 🤔
W20241003-17:19:15.086(2)? (STDERR) 5:19:15 PM [vite] Internal server error:
W20241003-17:19:15.086(2)? (STDERR) ERROR Could not locate 'index.js' in package!
W20241003-17:19:15.087(2)? (STDERR) undefined
W20241003-17:19:15.087(2)? (STDERR)
W20241003-17:19:15.087(2)? (STDERR) --[Error Stack]----------------------------------------------------------------------
W20241003-17:19:15.087(2)? (STDERR) at get mainModule [as mainModule] (/Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/meteor-vite/dist/plugin/index.js:1549:13)
W20241003-17:19:15.088(2)? (STDERR) at _MeteorPackage.getModule (/Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/meteor-vite/dist/plugin/index.js:1489:19)
W20241003-17:19:15.089(2)? (STDERR) at _MeteorPackage.serialize (/Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/meteor-vite/dist/plugin/index.js:1562:28)
W20241003-17:19:15.090(2)? (STDERR) at _MeteorPackage.toJson (/Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/meteor-vite/dist/plugin/index.js:1479:26)
W20241003-17:19:15.090(2)? (STDERR) at storeDebugSnippet (/Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/meteor-vite/dist/plugin/index.js:1912:66)
W20241003-17:19:15.090(2)? (STDERR) at async Context.load (/Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/meteor-vite/dist/plugin/index.js:1897:9)
W20241003-17:19:15.090(2)? (STDERR) at async Object.load (file:///Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/vite/dist/node/chunks/dep-b2890f90.js:44323:32)
W20241003-17:19:15.090(2)? (STDERR) at async loadAndTransform (file:///Users/timo.frionnet/Github-projects/vite-files-bug/node_modules/vite/dist/node/chunks/dep-b2890f90.js:54954:24)
W20241003-17:19:15.091(2)? (STDERR)
W20241003-17:19:15.091(2)? (STDERR) ERROR Could not locate 'index.js' in package!
W20241003-17:19:15.091(2)? (STDERR) undefined
W20241003-17:19:15.091(2)? (STDERR)
W20241003-17:19:15.092(2)? (STDERR) --[Error Stack]----------------------------------------------------------------------
This can be reproduced by using the ostrio:files-bug branch on this repo
Let me know if you are able to get it working and can find a fix.
Thank you!