Closed dingfengquek closed 4 years ago
How are you loading the module? Inside other .import.js(x)
file or from normal js file using System.import('/main')
?
In the second case usual Meteor file loading order is still important, and main
files are loaded at the end, so the module may not be ready at the time you are requesting it. The same way you cannot System.import('/z')
inside a.js
.
We take care of this inside modules so you can do import z from './z'
inside a.import.js
, but for other cases Meteor normal rules are still in play.
I'm doing this inside a .import.js(x) file, on the client.
For e.g., I just tried it again with
When I run the app on the client, I get this error:
Uncaught (in promise) [Universe Modules]: Trying to load module "/client/main" that doesn't exist! Error loading /modules/app/client/main as "/client/main" from /modules/app/zzz-module-entrypoint/inside
I'm not able to reproduce it right now. As a temporary workaround please don't use main as a module name to be imported. I'll look into it after the holidays.
Noted. I'll upload a Meteor project tarball where I can consistently produce this error, after the holidays as well.
That would be great, thanks! 26 gru 2015 14:13 "Dingfeng Quek" notifications@github.com napisał(a):
Noted. I'll upload a Meteor project tarball where I can consistently produce this error, after the holidays as well.
— Reply to this email directly or view it on GitHub https://github.com/vazco/universe-modules/issues/38#issuecomment-167323363 .
EDIT: Added .meteor directory to the tar (excludes .meteor/local)
hey, since Meteor 1.3 would have modules, i don't think this issue would be much relevant in the long-term, nor is it that important to verify whether this the coding error leading to this issue will lead to other more critical problems.
immediate needs: anyone who encounters this can just use another filename, until 1.3 is stable.
thanks though!
We've decided to archive some of our repositories as we are no longer using nor willing to maintain them. Part of this process involves closing related issues and PRs. If you still need help, do contact us on opensource@vazco.eu.
Unable to find the module when the filename is main.import.js or main.import.jsx.
I'm not sure whether this is replicable in other environments; If it's an issue, it's a minor inconvenience only: documenting it down would solve it (if the code is hard to change).
Please close if it can't be replicated.