Meteor wants MONGO_URL on startup - meteor

After then I downgrade to 0.6.4.1 version on startup I have error:
Error: MONGO_URL must be set in environment
So I try set this variable
root#xxx:/home/xxx/Documents/exchange# echo $MONGO_URL
mongodb://localhost:27017/exchange
But it doesn't help.
I try to start developer server not bundle.

It appears you double-posted this in the Meteor google group as well:
https://groups.google.com/forum/#!topic/meteor-talk/lAReHjJZjl0
In any case, for your reference and others, you are probably not actually on 0.6.4.1 unless you run meteor --release 0.6.4.1. From your other post, you are still on 0.6.5 and you need to add standard-app-packages for it to work properly if you were previously on 0.6.4.1. See the following:
https://github.com/meteor/meteor/issues/1257

Related

Meteor 1.9 build broken with rollup enabled

I'm getting following error in my Angular Meteor project:
TypeError [ERR_INVALID_ARG_VALUE] [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string or Uint8Array without null bytes. Received '\u0000commonjs-proxy:/builds/intemp/in-pool/node_modules/core-js/internals/package.json'
at readFile (fs.js:295:10)
at go$readFile (/home/meteor/.meteor/packages/meteor-tool/.1.9.0.1mtsmz6.qnno++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:110:14)
at Object.readFile (/home/meteor/.meteor/packages/meteor-tool/.1.9.0.1mtsmz6.qnno++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:107:12)
at next (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/browser-resolve/index.js:98:12)
at load_shims (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/browser-resolve/index.js:116:7)
at resolve (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/browser-resolve/index.js:236:5)
at /home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:66:5
at new Promise (<anonymous>)
at Object.resolveId$1 [as resolveId] (/home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:63:11)
at resolveId (packages/angular-typescript-compiler/rollup.js:52:26)
at /home/meteor/.meteor/packages/mibto_angular-compilers/.0.3.4.1i9jtu1.vtaoi++os+web.browser+web.browser.legacy+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-typescript-compiler/node_modules/rollup/src/utils/first.js:8:31
at /home/meteor/.meteor/packages/meteor-tool/.1.9.0.1mtsmz6.qnno++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40 {
code: 'ERR_INVALID_ARG_VALUE'
}
I'm running following command to build:
METEOR_DISABLE_OPTIMISTIC_CACHING=1 ROLLUP=1 AOT=1 BABEL_CACHE_DIR=/tmp meteor build ../output
without rollup it works, and it also worked before Meteor 1.9
Does anyone have any ideas how to resolve this?
I don’t think rollup=1 has ever worked properly in the angular-meteor compilers. I vaguely remember ardatan mentioning it in a github issue but can’t locate the exact one. The documentation still states it as an option but I think you should forget about it unless you want to fix the specific compiler issue.
Meteor 1.9 is a big upgrade as it uses node 12 so I would not be surprised if this has introduced an issue in the angular compilers package. It probably needs a few tweaks to bring it up to date.

Sudden syntax error after deployment

I have a working symfony project. I have it on a private bitbucked repository and locally the website works without an issue.
Today I tried to deploy the project onto an external server linuxpl.com.
Steps taken include:
Istalling composer
Adding the mysql database
Running git clone to get the data into a proper location
Running composer install on the folder to install everything and connect to the db
Cleared the cache
Set the project root as ....domain/project_name/web
However after completing all these steps, when running the website with regular server:run I'm getting this odd error:
Parse error: syntax error, unexpected '.' in /home/spirifer/domains/surowcewobiektywie.pl/konkurs/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1571
Not sure if this is of any importance but the mentioned code partion looks like this in my local files:
// Some objects throw exceptions when they have __call, and the method we try
// to call is not supported. If ignoreStrictCheck is true, we should return null.
try {
$ret = $object->$method(...$arguments);
} catch (BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
return;
}
throw $e;
}
The local version does not differ from the one on the server.
My local machine has PHP 7.0.9 and the remove server has PHP 7.0.14
How could I fix this issue?
PHP 5.6 adds Variadic functions, with "...". However, Twig v1.x only required the use of PHP 5.2.7 or above.
If you didn't explicitly update to Twig 2.0, it's very possible you have used the 'death star' version constraint in the composer file - '*'. which allows uncontrolled version updates to the latest version. If this is the case, you will need to either update your version of PHP, or at least require just a previous version of Twig/twig, "^1.32" would be the latest in the version 1 series of Twig.

Iron router: Error: Couldn't find a template named "/" or "". Are you sure you defined it?

I have trouble setting up a simple iron:router example: (docs, sample app)
meteor create testapp
cd testapp
home.html:
<template name="Home">
<h1>Welcome</h1>
home
</template>
router.js:
Router.route('/', function () {
this.render('Home'); // Also tried 'home'
});
Starting the server:
meteor
Then I get (client side):
Exception from Tracker recompute function: Error: Couldn't find a template named "/" or "". Are you sure you defined it?
at null._render (http://localhost:3000/packages/iron_dynamic-template.js?32038885cb1dad7957291ffebfffcb7f8cd57d20:239:17)
at doRender (http://localhost:3000/packages/blaze.js?88aac5d3c26b7576ac55bb3afc5324f465757709:1853:25)
...
What am I doing wrong ?
Note: I get the exact same error if I clone the example application (basic.html and basic.js).
meteor list
autopublish 1.0.1 Publish the entire database to all clients
insecure 1.0.1 Allow all database writes by default
iron:router 0.9.4 Routing specifically designed for Meteor
meteor-platform 1.1.2 Include a standard set of Meteor packages in your app
Also:
meteor --version
Meteor 0.9.4 <- Why all standard packages and meteor platform are > 1.0 and this is 0.9.4 ?
Currently, there are two versions of iron:router.
iron:router#0.9.4 is the one added by default when you type meteor add iron:router, this version is the latest in the "legacy" branch of iron:router that came up more than one year ago, it's the one that everyone is probably still using, although they should definitely update to...
iron:router#1.0.0-preX with X = 4 as of 20/10/2014, which is a complete rewrite of the package intended to be backward compatible, but introducing a new, nicer and polished API. This version will likely be set as default when meteor hits 1.0.0 later this year. The problem is that github page of iron:router shows this particular branch (1.0.0-pre4) along with examples that people believe are usable with 0.9.4.
This means that you are most likely using the wrong version of iron router, remove it with meteor remove iron:router and meteor add iron:router#1.0.0-pre4 instead.
Recommended reading to learn about the latest iron:router syntax :
http://eventedmind.github.io/iron-router/
Sometimes the guide is not completely up-to-date with the pre-release version, if you want to keep up with the latest stuff take a look at github issues.

Meteor 0.9 package publish issue

As per this https://hackpad.com/Migrating-Packages-zN0we9sIjkH I created a new meteor package and currently facing a problem when trying to publish.
PackageName : 'UserId:packageName'
To add package : 'meteor add packageName' (mateor add UserId:packageName did not work).
Package runs locally without any issue.
When I tried to publish,
cd path/to/your:package
meteor publish
Message :
There is no package named 'packageName'. If you are creating a new package, use the --create flag.
Publish failed.
Then I tried "meteor publish --create"
Message :
To confirm that you wish to create a top-level package with no account
prefix, please run this command again with the --top-level option.
(Only administrators can create top-level packages without an account prefix)
I used "UserId: PackageName" when creating the package and already log in to meteor account. Any idea to fix this issue?
Thanks !
Make sure the name field is in package.js:
Package.describe({
name: "user:packagename",
// other fields
});
Then, there will be no need to make sure the package is in a directory with the same name.
See https://github.com/mizzao/meteor-user-status for an example.

How to install mmoreramerino/GearmanBundle with Symfony 2.1.x?

I am pretty new to Symfony 2 and brand new to Gearman.
I am looking for a bundle to integrate Symfony 2 with Gearman.
mmoreramerino's bundle seems to be the most popular bundle according to packagist. Unfortunately something seems to be broken, the autoloader does not find the bundle.
Fatal error: Class 'Mmoreramerino\GearmanBundle\MmoreramerinoGearmanBundle' not found in ...
I tried switching to "dev-development" as I got from the issues that it was fixed in this branch, but it did not work for me as well.
Question: How can I install this bundle using Symfony 2.1.x?
Question 2: Are there any working & documented alternatives?
Edit In case someone else comes across this question: Here is how I got it up and running!
Install gearman, libgearman, the PECL extension for PHP (use recent versions!)
check that gearman shows up in phpinfo() (both cli and webserver version)
start gearmand in terminal 1 using "gearmand --verbose INFO" (you will see workers & clients connect to gearman - or not ;-))
start in terminal 2 reverse_worker.php from the gearman php extension example directory
start in terminal 3 reverse_client.php from the gearman php extension example directory
If this is working, you are ready for Symfony: install mmoreramerino/GearmanBundle using "dev-development"
copy dev.base.yml from the bundle to app/config/gearman/dev.yml
Now add TestWorker.php to your bundle as outlined in the documentation
enable the testWorker by using the console script "php app/console gearman:job:execute MmoreramerinoGearmanBundleWorkerstestWorker~test"
now you are able to send jobs to the listening testWorker in a Symfony controller (or somewhere else in Symfony). I had to specify the server though I am using the default host/port.
$gearman = $this->get('gearman');
$gearman->setServer('127.0.0.1',4730);
$gearman->doNormalJob('MmoreramerinoGearmanBundleWorkerstestWorker~test');
To install the bundle, you need to add the following line to composer.json
"Mmoreramerino/GearmanBundle": "dev-development"
and run composer update;
Then register it in app/AppKernel.php (it seems you have already done this)
new Mmoreramerino\GearmanBundle\MmoreramerinoGearmanBundle(),

Resources