App not loading dependency properly from another package - meteor

I'm playing a bit with Meteor and got stuck with a problem here. I'm using Meteor 1.2 btw.
I'm implementing a cardgame, so as I read over the interwebs as a good practice, I started separating my app features in packages.
I did an app-lib package to wire my dependencies. That package is then required by other packages in the app, so in the case that I have to update some package's version, it updates for all the packages that use it at once.
In this app-lib package I api.imply() the dependencies that I want to expose, to the other packages that use it. Right now, I have just one other package that is a board package that api.use() the api-lib, but I'm getting the following error on app startup:
"Object [object Object] has no method 'helpers'"
This error goes for a Collection and has to do with the dburles:collection-helpers package I think.
The things I tried to solve the problem:
Check that app-lib has dburles:collection-helpers on the api.imply()
Include dburles:collection-helpers in the main app
Include dburles:collection-helpers in the 'board' package
The problem persists. It's important to notice that before I extracted the packages, all the dependencies were in the main app and everything worked fine.
I think maybe the problem has to with some load order stuff that I'm not familiar with.
Any guesses?

try remove the package and install it again? As far i know meteor sets the

Related

URL '/help/library/<package>/r/html/00Index.html' not found when using `devtools::load_all()`

I am using devtools::load_all as a workflow to iteratively make a package. However, I cannot seem to be able to view the package documentation using ? or help(package=package_name) until I install the package. The error I get is:
No documentation for ‘function’ in specified packages and libraries
and
URL '/help/library//r/html/00Index.html'
any suggestions on how to resolve this?
Thanks!
I guess the help(package=package_name) do nothing than open (in case of Windows) this file for you:
C:\Users\YourName\Documents\R\win-library\4.1\package_name\html\00Index.html
devtools::load_all make your latest functions available to you for testing without installing the package (i.e. the html file was not updated, and masked because it was belonged to the old version of your own package). To view your latest documentation (i.e. make a new version html), you can devtools::document() and check your package working directory \man\Functions_name.rd, OR, devtools::install() and help(package=package_name)
Just restarting r session solved my problem.

Error in library(shiny) : there is no package called 'shiny' ON WINDOWS

I developed a Shiny app that runs fine locally, but I get
Error in library(shiny) : there is no package called 'shiny'
when I try to publish to shinyapps.io.
I have seen multiple responses about how to correct on Ubuntu, etc., but I am running R 3.2.2 and R Studio 0.99.486 on Windows 7 Enterprise.
How I can correct this problem on Windows?
I've found a solution in shinyapp's issue #73. They don't really explain why this happens, but they advise to use require() instead.
Both ui and server objects are functions and require() is prefered inside functions. Take a look at library()'s documentation:
library(package) and require(package) both load the namespace of the package with name package and attach it on the search list. require is designed for use inside other functions;
A bit too late but maybe someone else will benefit from it later on.
Had same issue on Windows 10.
I just used manual installation:
Tools -> Install packages -> type your packages and hit install.
Then everything you need will be there for you.

Composer Packages conflict

I'm installing a new package on composer and I'm receiving the following error when I try to run 'composer update':
[Symfony\Component\Process\Exception\RuntimeException] The process
has been signaled with signal "11".
I have figured out that the new package is somehow conflicting with another package I already have installed. On their own, I am able to install either one, but when I try to install both of them together, I receive that error message.
The packages that are in conflict are (from composer.json):
"laravel/cashier": "~2.0" "thujohn/analytics": "dev-master"
How can I figure out what is causing this conflict and how can I fix it?
I'm not sure the error you are receiving is due to package conflicts. Typically signal 11 indicates a segmentation fault where a process has attempted to access an invalid memory address or cannot otherwise write correctly. The first things to check is that write permissions are set correctly and you are an using up-to-date version of composer.
If it is due to a package conflict then a quick & easy fix is to be more specific with the package versions specified.
try:
"thujohn/analytics": "1.0.*"
Also, I notice that you are using a very old version of Laravel Cashier (it's now up to version 5). If possible, switching to a newer version may help.

Meteor: Random.fraction() issue

I'm getting the following error when after installing my Meteor app (developed on an older version of Meteor) on Meteor version 1.2.0.1:
ReferenceError: Random is not defined
Offending line:
Players.insert({name: names[i], score: Math.floor(Random.fraction()*10)*5});
I've never had a problem with this line of code before and according to the docs this should still work.
Any ideas?
You've got to install the random package, it's not installed by default anymore. A simple meteor add random will suffice.
Some basic packages were removed from Meteor to reduce its initial footprint. Perhaps if you run meteor add random your issue will be solved. The update process was supposed to detect your use of Random and automatically install the package but perhaps it slipped through.
If you are working inside of a package, you may need to add random#1.0.4 to your api.use().
For a list of packages that are no longer installed by default, see this link: https://quip.com/RXFlAk9Rc2xI . It also contains some other interesting notes about the update.

Meteor: Possible to reference a local package while writing a local package?

I have a local package that I am writing. I wanted to extend some functionality from a few of the core meteor packages. In order to do this, I was creating another local package.
So now local package A is attempting to use local package B. But even after adding the symlink to package A's packages folder, I get an unknown package error when running test-packages.
meteor add local-package-b
Doesn't work because meteor complains: You're not in a Meteor project directory
Is this even possible or do I need to publish to atmosphere first? I wanted to keep the additional package local as it's going to be a handful of helper methods.
I've double checked the name in package B's package.js file and it matches with my api.use in package A's package.js file.
Symlinks shouldn't be necessary here. Local packages are found by checking:
Anything under the directory pointed to by the environment variable PACKAGE_DIRS.
Anything under the packages directory in the current application directory.
Core packages.
As long as your two packages reside in one of those three locations, the should be found. Also see my article on local packaes for more details on (1).
Based on our conversation below, the main issue had to do with the approach to creating a new package. While it's being written, it's necessary that a package be added to (or tested by) an app. Here are the steps I take when working on a shared, local package:
Create a new app.
meteor create --package mypackage
meteor add mypackage
Finish writing and testing the package.
Move mypackage under my PACKAGE_DIRS directory so it will be available to other apps.

Resources