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
Packages not being able to access their own assets at first run of the app that uses them #2606
Comments
@mizzao @glasser But the first time the handler is triggered, there are no files yet in the It might just be a problem with the order steps are being executed during build time. |
It sounds like this is working as intended. The |
@n1mmy if that's the way it's intended to work, how can you access the assets of a build plugin from the plugin itself? What's the correct way? |
@tanis2000 in #2506 I suggested being able to access files in the package's subdirectory. I'm not sure about being able to access the build output as that is something that should be internal to Meteor and not have to be externally documented. |
@mizzao what you suggest would be a perfect fit for what I'm trying to do. I was using the build output folder as I had no idea how to access the package's folder. But as far as I can see, there still isn't a proper (un)documented way. How are you getting around that? |
We aren't; we're making incremental dumb updates for each internal Meteor API change as in There are both client side and server side changes that have to done, I opened #2392 a long time ago but the issues in it seem to have been largely overlooked. |
You're actually luckier than me as you have a sort of workaround for most issues. But in my case I have to be able to access the assets of the package during the build phase (aka the first time Meteor starts, or after a |
@n1mmy The underlying point of this issue has been sidestepped. It appears there is no way for a package and/or the meteor app that houses it to access the package's files at build time. Is this correct? If so, are there plans to make these files available at build time? |
@reywood Yeah, that's right. There isn't currently an API for packages to access assets at build time. I know it's frustrating. Sorry. We do plan to revisit APIs for package building (some preliminary thought is here: https://meteor.hackpad.com/New-control-file-brainstorming-ZDBMiEQ6DZl), though no exact timeline for that yet. |
… Meteor, needed to create the assets for packages that need them (Workaround to meteor/meteor#2606).
This is still happening on Meteor 1.2.0.2 with the https://github.com/meteoric/ionic-sass project. Ionic-sass compiles files that are pointed to by client/ionic.scss. For a while, this only happened the very first time running the server. Not it's happening every time, even though I can see the files are clearly there. This may also be an issue with fourseven:scss: https://github.com/fourseven/meteor-scss -- the SCSS processor. |
@gbhatnag +1 |
@gbhatnag this fix worked for me meteoric/ionic-sass#16 |
Can confirm, this is still happening. |
+1 |
Hi there, did anyone upload his/her meteoric utilizing app to apple's app store with success? Regards |
If you use
Package._transitional_registerBuildPlugin
to run arbitrary code at build time when the package is being deployed inside an app, the first time the handler is being run, the.meteor/local/build
folder with the content of the packages is not yet there and the package itself cannot access its own files.The second time you run
meteor
, it will work as expected as the files have been copied there at the end of the first run.If you run
meteor reset
this happens again as the folder is cleaned up.Is there a different solution or is it a bug? Is there any workaround?
The text was updated successfully, but these errors were encountered: