My current project is at https://github.com/jimmack1963/localPackages.git.
I am trying to get this code to work:
console.log("You pressed the button, " + MyName);
where MyName comes from a package called simple, that is JUST LOCAL. Per 6.5, am exporting via
Package.on_use(function (api, where) {
api.add_files(['constant.js'], 'client');
//below added per possible suggestion from Nathan, had no effect.
api.use('constant.js', 'client');
if (api.export)
api.export('MyName');
});
Am trying to factor my code out to local packages. This is not about publishing packages, but about using local ones, which is referred to in many places. My package is simply trying to publish a string, MyName. But the project wants none of it. "MyName is not defined."
I copy the technique in 'Discover Meteor,' but it doesn't work for me, and I try other things. Have had a lot of success in Meteor in general.
This spec seems to be changing. I get the 6.5 export requirement, but easily find contradictory advise about the base project's need to add that project in smart.json (not the one in the package). Most references don't list that as a requirement at all.
I've tried
{
"packages": {
"simple" : {
"path": "packages/simple"
}
}
}
and putting it into git and trying from a different project:
{
"packages": {
"simple" : {
"git": "https://github.com/jimmack1963/localPackages.git"
}
}
}
For the latter, pleasingly, the installer was smart enough to burrow down and extract the package itself, ignoring the project wrapping it in the git project. Nice! So, I have the same problem when I install the package directly from git, still not published to the world.
Ubuntu 13.04
Meteorite version 0.6.11
Meteor Release 0.6.5.1
I had the same issue after migrating to 0.6.5 -
You only get 'exported' variables from packages you explicitly "use"; Packages "use" other packages by calling .use inside Package.on_use, projects "use" packages by adding them to .meteor/packages
Additionally, it seems to be quite picky about exporting variables, and wont currently export ones preceded with this.
Related
When I upload my project to google play store I am getting Libpng library error and app getting rejected. I am not sure where it been used. I been used many library might be among those. How can I find it out exactly where this been used.
Is there any way to force fully by pass this like (Just an example)-
resolutionStrategy {
force 'com.google.android.gms:play-services-vision:11.4.2'
}
To get the list of dependency you can run this from Gradle -> Dependencies
Then you can find out which library causing issue and you can exclude it like this
dependencies
{
compile 'com.android.support:support-v4:xx.0.+'
compile ("com.xxx:xxx-commons:1.+")
{
exclude group: 'junit', module: 'junit'
}
}
I'm currently using the Qt-Installer-Framework to create a setup for my application. Everything works fine for now except one thing:
If I install it to any location but C:\Program Files\MyApp, the installer won't create the registry entry for Programs and Features!
Is there a way to tell the installer to always do this?
Edit:
After trying out vairous different combinations, I do know now where the problem comes from:
If I try to install as current user only (set the AllUsers variable to false), it will always work and create an entry in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}.
If I install for all users, however, it will try to create a key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}. This will only work, if the installer has to elevate it's operations during installation (because I chose a directory I need admin rights for).
So, the error is: The installer won't elevate itself to create the "global" registry entry and thus fails to create it. Any ideas on how to fix it?
Here the link which has answer to this question.
Add the following line to your component's package xml file:
#<RequiresAdminRights>true</RequiresAdminRights>#
And use this line in your script file:
#component.addElevatedOperation("Execute", "someCommand");#
instead of
#component.addOperation("Execute", "someCommand");#
There is boolean installer.gainAdminRights() to gain elevated privileges during runtime but you will have to add it to an installer script (in packages meta directory) something alike
function Component()
{
if (!installer.isInstaller())
{
if (allUsers && installer.gainAdminRights())
{
//Set registry global
} else {
//Set registry local
}
}
}
What are the constraints that Meteor is trying to resolve when it loads the packages at startup? Is it all related to versioning or is it actually looking at the code that you load with ap.use() in packages.js?
I am getting this error when I try to start up my project. I have a super-simple package file that I created with the meter create --package command. I put all of my files that make up the package into the directory that it created and moved that directory to .meteor/packages. I'm just trying to create a local package for now. Here's the contents of package.js in that directory:
Package.describe({
name: 'ammap-meteor',
summary: 'mapping library packaged for meteor ',
version: '1.0.0',
});
Package.onUse(function(api) {
api.versionsFrom('METEOR#0.9.0');
api.addFiles('ammap.js');
api.addFiles('ammap_amcharts_extension.js');
});
Package.onTest(function(api) {
api.use('tinytest');
api.use('ammap-meteor');
api.addFiles('ammap-meteor-tests.js');
});
My ammap-meteor-tests.js file is blank for the moment but it exists. Would that make a difference? And I assume you just omit the git: property from Package.onUse() for a local package, is that right?
OK, I was able to get past that error with the publish command:
meteor publish --create
So I did not succeed in making a local package (still not clear on that) but at least I can get the package to load now.
After upgrading to 0.9.0.1 it would seem that CoffeeScript packages have two problems:
The exports from package.js don't seem to be exported.
The source files don't seem to be compiled.
package.js:
Package.describe({
summary: "sunburn"
});
Package.on_use(function (api, where) {
api.add_files(['lib/sunburn.coffee'], 'server');
api.export && api.export('Stinger', 'server');
});
Package.on_test(function (api) {
});
sunburn.coffee:
Stinger = -> "stinger here"
This is a local package. Both 'meteor add sunburn' and 'meteor remove sunburn' work fine. If sunburn.coffee is modified the server restarts. However, 'Stinger' is undefined when used from the server-side code. Somewhat more interestingly, if sunburn.coffee is modified to include syntax errors, the server will happily restart and no error will be reported. This is what leads me to believe that the CoffeeScript files aren't even being compiled. Or, at least, not being fully "wired up".
Code similar to this worked in the pre 0.9 version.
One last note: if the sunburn.coffee is changed to be a normal js file, 'Stinger' rewritten as normal javascript, and the file path updated in package.js, the above works fine.
Thanks :-)
You need to specify that your package actually depends on coffeescript to make the compilation happen :
api.use("coffeescript","client");
Previously, only having your app depending on build plugins (less, coffeescript, etc...) was OK but apparently now you have to specify that you use them inside packages as well.
Unrelated, but you should also specify a version in your Package.describe, and testing for the existence of api.export is unrelevant because I hope nobody is using Meteor < 0.6.5 anymore.
Meteor 0.8.0 is out with the new Blaze rendering, which is great... for the future.
At the present I can't run my Iron Router powered app: updated -> ran meteor -> white browser screen. I guess I'll roll back to 0.7.2. but that gives me a fuzzy feeling. Its like have a new computer with no internet connection. Is there any fix for these changes? At least for Iron Router?
Note Comment (although it was in the title):
I am learning meteor using the Discover Meteor book, it's a great book written by same author of Iron Router; I love it. However, if meteor changed that much am I wasting my time?
Update
#iAmME's solution works great! I solved it another way that also fixed iron-router-progress by modifying the smartpackage. Just wanted to post it if it helps anyone:
{
"packages": {
"blaze-layout": {},
"iron-router":
{
"git": "https://github.com/EventedMind/iron-router.git",
"branch": "blaze-integration"
},
"iron-router-progress":
{
"git": "https://github.com/Multiply/iron-router-progress.git",
"branch": "blaze-integration"
}
}
}
Just faced the same issue,
Did the following and works fine
It occurs mostly because of the iron-router package and few other packages which are using spark as dependency and first re-install the iron-router like below
meteor remove iron-router
rm -rf packages/iron-router
mrt update
mrt add iron-router
Just re-installing the iron-router will update you to the new version and also it installs blaze-Layout automatically with the iron-router(which is the new templating system).
After updating iron-router,Even now if you are getting spark is not defined error,check which package is using spark and update those packages too.
You have to update your iron-router package. Check out the Iron Router github page https://github.com/EventedMind/iron-router for information on what's new in their 0.7.0 release. It works for Meteor 0.8.0.