Unable to run any Meteor app - meteor

Recently I have discovered the Meteor framework and wanted to run some examples on my machine. I've done the following steps:
curl https://install.meteor.com/ | sh
meteor create myapp
cd myapp
meteor
And as a result I get:
[[[[[ ~/workspace/myapp ]]]]]
=> Started proxy.
/home/marcin/.meteor/packages/meteor-tool/.1.0.38.ieqxkv++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
throw(ex);
^
SyntaxError: Unexpected end of input
at Object.parse (native)
at readSessionData (/home/marcin/.meteor/packages/meteor-tool/.1.0.38.ieqxkv++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/auth.js:136:15)
at Object.exports.getSessionId (/home/marcin/.meteor/packages/meteor-tool/.1.0.38.ieqxkv++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/auth.js:1029:32)
at /home/marcin/.meteor/packages/meteor-tool/.1.0.38.ieqxkv++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/tools/stats.js:66:23
I tried to reinstall Meteor and meteor reset but it won't help. I removed the app and created a new one but the problem still occurs. I managed to run the examples finally using Vagrant, but this is only some workaround and not a solution to the real problem. I have no idea why a fresh install of Meteor won't work on my machine. I am running 64bit Ubuntu 14.04. I'd appreciate any help with this.

As #imslavko said, the solution to this problem is to remove the meteor session file: rm ~/.meteorsession.

This is a shot in the dark, but can you do an update from within the project directory?
meteor update

try this command
$ meteor -p 3006
open port her and go to localhost:meteor -p 3006

Related

Creating custom gutenberg block gives 'Unexpected token .'

I am trying to create a custom gutenberg block to use in the wordpress gutenberg editor but when trying the command: npx #wordpress/create-block test-block it starts with installing a few things but all of a sudden I get:
npx: installed 126 in 13.341s
Unexpected token .
What is causing this?
I am following this tutorial: https://kinsta.com/blog/gutenberg-blocks/ except I am not using any of the hosting options from the tutorial since I have my own wordpress installation already running (locally).
Check your node version, I got the same error using node.js version 12, then I changed it to versi
For folks on Ubuntu: I ran into the same issue and found that the nodejs installable via apt is out of date. I had to download the tarfile from nodejs.org and install it with the help of How to install node.tar.xz file in linux. After that it ran as I expected.
(I tried the LTS version. node --version returns v18.12.0)
I also had this problem. All I needed to do was to update my Node version.
I followed these steps (run in Mac Terminal):
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Hope this helps.

Can't check Meteor Version in Terminal

[react-pocketscholar (master)]$ meteor --version
/Users/ftrflyr/.meteor/packages/meteor-tool/.1.3.4_3.1v4v008++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:165
throw error;
^
Error: EEXIST, symlink '/Users/ftrflyr/.meteor/packages/meteor-tool/.1.3.4_3.1v4v008++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle'
[react-pocketscholar (master)]$ meteor -v
/Users/ftrflyr/.meteor/packages/meteor-tool/.1.3.4_3.1v4v008++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:165
throw error;
^
Error: EEXIST, symlink '/Users/ftrflyr/.meteor/packages/meteor-tool/.1.3.4_3.1v4v008++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle'
1. Global tool version of meteor command
Find version by:
meteor --version
2. Project version of meteor
A project stays at the meteor version which it was created with unless manually upgraded. Find this by running:
cat .meteor/release
Another way to do this is to open up your Javascript console in the browser and type:
console.log(Meteor);
This is very useful for me as I'm running Ubuntu on a Chromebook so I don't need to stop my local server to check which version I'm currently running.
Please note the server does need to be running (localhost:3000) for this command to work.
You have to be in a meteor project repository and type meteor --version

Running meteor on linux server

I am trying to get my localhost working on my remote (mediatemple) server.
I have bundled it up and have a /myurl.com/bundle folder with the following files.
this folder contains
main.js
npm-debug.log
programs
server
How do I get this to run?
You should take a look in the README inside the bundle folder. Normally everything ist described there to start your app.
Make sure that NODEJS and MONGO is installed on your remote server. This is NOT included in your bundle as well as NODEJS is not present.
If you are running a system like debian or ubuntu normally you can do the installation with
apt-get install nodejs mongo
Make sure, that the nodejs has release v0.10.36 or v0.10.38
node --version
At the README you see the necessary ENV-VARS like MONGO_URL and PORT you need to set to start your meteor app.
If you have running a apache server already the PORT 80 is already blocked, so try PORT=3000 to start your meteor app.
Example:
MONGO_URL='mongodb://localhost:27017/yourapp' ROOT_URL="http://yourhost" PORT=3000 node main.js
If using as above you do not need to export the ENV-VARS before start
Sometime when starting, there are missing NPM – you get fiber errors
In that case
cd programs/server
npm install
and the try start again.
Good luck
Tom
(I'm writing this response assuming that you are not worried about scalability issue, respond in comment if you want to scale your app)
The best option for running a node application, which Meteor application is, is by using forever.
npm install forever
forever start simple-server.js
If you want to figure out how to see the log files and how to stop/restart your service, you can run forever --help to see all the commands.

Meteorite on windows 8.1 with vagrant ( cannot install packages )

I am very new to Linux ( does't even know the basic commands ) i am using https://gist.github.com/gabrieljenik/d926cbb90706d95abdee to setup vagrant on my windows 8.1 machine. i have created my test app and need to install packages like iron router etc.
when i try to execute
sudo npm install -g meteorite
it throws error : sudo command not found
mrt add iron-router
it throws error mrt: command not found
cannot figure out what the problem is
If you're very new to Linux and Meteor, don't use complicated stuff like Vagrant. Just use Meteor on Windows, with WebStorm. It works out of the box.
Note: meteorite has long been deprecated. Start with the official Meteor tutorial, http://meteor.com/try.
Install Meteor for Windows
Install and start WebStorm
Create a new project, choose type Meteor.js app, then "default".
Run -> Run -> Edit configurations
Click the + to add a new configuration of type Meteor
Call it simple-todos for clarity (this is optional)
Click Run
Notice how Webstorm starts a console within the IDE, which shows the familiar Meteor startup sequence:
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
If you're prompted for any firewall permissions, make sure to allow all traffic from Node.js.
Now you can edit your app in WebStorm on Windows. Welcome to Meteor!

How to install Symfony 2.6 on Openshift?

I have tried the following guide to install symfony2 on Openshift.
But It does not work. After I visit the /url/app_dev.php, I have got a blank page (yes I removed the IP checking) with 500 error code.
I have no idea what is the problem. I did this tutorial 3 times, and still does not work. However it seems the composer installation does not work too, because I've got this message after a git push:
Could not open input file:
/var/lib/openshift/54a6c9f15973cac60f0000bd/app-root/data//composer.phar
Perhaps its a permission problem? Try chmod a+x on this file.
what you can do it via SSH log yourself into remote server using the rhc ssh command. Then got to app-deployment -> current -> repo -> php and within this directory run
"curl -sS https://getcomposer.org/installer | php"
this is how you have composer.phar within your installed app

Resources