Is Meteor running from the wrong path? - meteor

I have just installed Meteor from the auth branch. Meteor seems to read its content from /usr/lib/meteor - But it was installed to /usr/local/meteor. /usr/local/meteor/packages contains all packages i need but when i list packages from terminal it shows the default ones. I'm trying to run a project i recently created on another computer:
Errors prevented startup:
Exception while bundling application:
Error: The package named accounts-ui does not exist.
at _.extend.init_from_library (/usr/lib/meteor/app/lib/packages.js:91:13)
at Object.module.exports.get (/usr/lib/meteor/app/lib/packages.js:225:11)
at self.api.use (/usr/lib/meteor/app/lib/bundler.js:83:28)
at Array.forEach (native)
at Function._.each._.forEach (/usr/lib/meteor/app/lib/third/underscore.js:76:11)
at Object.self.api.use (/usr/lib/meteor/app/lib/bundler.js:82:9)
at _.extend.init_from_app_dir [as on_use] (/usr/lib/meteor/app/lib/packages.js:136:11)
at _.extend.use (/usr/lib/meteor/app/lib/bundler.js:362:11)
at Object.exports.bundle (/usr/lib/meteor/app/lib/bundler.js:649:12)
at exports.run.restart_server (/usr/lib/meteor/app/meteor/run.js:509:26)
Your application is crashing. Waiting for file change.
My first thought was that some 'Meteor-path-variable' was set wrong, but i cant find something like that.

Solved - Restarted the computer..

Related

Error while starting Meteor App: illegal operation on a directory, unlink ".../dev_bundle"

I get this Error when trying to start my application on my server with the command:
meteor
error:
Error: EISDIR: illegal operation on a directory, unlink '/home/.../.../myapp/.meteor /local/dev_bundle'
at Error (native)
at Object.fs.unlinkSync (fs.js:932:18)
at exports.makeLink (/tools/cli/dev-bundle-links.js:20:8)
at [object Object].ensureDevBundleLink (/tools/project-context.js:1416:7)
at [object Object]._readFile (/tools/project-context.js:1350:10)
at new exports.ReleaseFile (/tools/project-context.js:1300:8)
at /tools/cli/main.js:825:22
My app is running fine on my dev. win. machine.
I have no idea what is causing the error, please help.
I got it working by manually removing all directories and links where the name started with "dev_bundle" inside the "/.meteor/local" directory.
Hope this helps!
Also update meteor to the latest version using meteor update and then follow #henk's solution.
This worked for me.

Meteor build error on windows 8.1

I have installed Meteor on Windows 8.1 - 64 bit to continue developing an existing meteor app. But, I cannot start it.
Problem
I run "meteor run": it starts proxy, MongoDB, selects packages, and after the last step, "Building the application", I get an error which I cannot explain (see stack trace). Then, it keeps trying to build the app, and gives the same errors over and over again.
Strange things:
the exact same project works just fine on Ubuntu and Mac OS - now I want to use Windows 8.1 (note: I have cloned the repository using git)
the demo app "todos" works on my meteor on Windows 8.1
What I tried
I had reinstalled Meteor, checked the packages (I have both npm&node.js) meteor --test-packages, meteor --reset, google all the info from the trace or any other question about meteor building errors on Windows 8.1, but couldn't solve my problem.
My questions:
How to make it work?
Does it have to do with Windows 8.1 itself or do I just don't have something installed/set on this pc.
Update 1
I created a new meteor project and copied all the files to this new folder. I started to add all the packages, and it seems that the problem appears when I add this package:
oauth-encryption
It seems to be the same problem as the one here: https://github.com/reactioncommerce/reaction/issues/363. But still, can't find the solution.
Stack trace
C:\Users\Cristi\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-
os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: The operating system cannot run %1.
C:\Users\Cristi\AppData\Local\.meteor\packages\npm-node-aes-gcm\0.1.3_6\npm\node_modules\node-aes-gcm\build\Release\node_aes_gcm.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.Npm.require (D:\Projects\time\.meteor\local\build\programs\server\boot.js:142:18)
at Package (packages/npm-node-aes-gcm/wrapper.js:2:1)
at D:\Projects\time\.meteor\local\build\programs\server\packages\npm-node-aes-gcm.js:33:4
at D:\Projects\time\.meteor\local\build\programs\server\packages\npm-node-aes-gcm.js:42:3
(STDERR) at D:\Projects\time\.meteor\local\build\programs\server\boot.js:222:10
(STDERR) at Array.forEach (native)

Meteor Package.describe() method doesn't exist after 0.9 upgrade

I'm getting the following error after newly upgrading to Meteor 0.9.0.1 and updating my package.js file to match documentation on packages
W20140903-17:30:20.305(-4)? (STDERR) /Users/admin/.meteor/packages/meteor-tool/.1.0.26.p03e91++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
W20140903-17:30:20.305(-4)? (STDERR) throw(ex);
W20140903-17:30:20.306(-4)? (STDERR) ^
W20140903-17:30:20.308(-4)? (STDERR) TypeError: Object #<Object> has no method 'describe'
W20140903-17:30:20.308(-4)? (STDERR) at app/zeroasterisk:throttle/package.js:1:44
W20140903-17:30:20.308(-4)? (STDERR) at app/zeroasterisk:throttle/package.js:22:3
W20140903-17:30:20.309(-4)? (STDERR) at /Development/Meteor/Meteor-Throttle-Example/.meteor/local/build/programs/server/boot.js:161:10
W20140903-17:30:20.309(-4)? (STDERR) at Array.forEach (native)
W20140903-17:30:20.309(-4)? (STDERR) at Function._.each._.forEach (/Users/admin/.meteor/packages/meteor-tool/.1.0.26.p03e91++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
W20140903-17:30:20.309(-4)? (STDERR) at /Development/Meteor/Meteor-Throttle-Example/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
$ meteor --version
Meteor 0.9.0.1
$ meteor list
standard-app-packages 1.0.0 Include a standard set of Meteor packages in y...
autopublish 1.0.0 Publish the entire database to all clients
insecure 1.0.0 Allow all database writes by default
bootstrap-3 0.0.0 Provides bootstrap 3.
showdown 1.0.0 Markdown-to-HTML processor
underscore 1.0.0 Collection of small helpers: _.map, _.each, ...
package-version-parser 1.0.6 Parses Meteor Smart Package version string
zeroasterisk:throttle 0.2.1 A secure means of limiting interactions (email...
I can't figure out what I'm doing wrong... can you?
I just had the same issue. The problem here is that you have the package in the root app folder app/zeroasterisk:throttle when it should be app/packages/zeroasterisk:throttle. Put your package inside the packages folder and it'll be solved.
you can to try read the official guide for the packages migration. In this guide explains how to fix broken packages. The url is
https://hackpad.com/Migrating-Packages-zN0we9sIjkH
Thanks for the suggestions -- as it turns out, it must have been some other Package. I created a new Meteor app and added my Package and it worked fine :/
So I don't know the exact cause, perhaps something overwriting the Package object, but anyway getting around it was easy enough.
I was having an issue that was preventing me from deploying my app. The reason was that I had a packages directory defined in my client folder (app/client/packages). This should however be in the main directory of the project (app/packages). After I removed package folder in the client folder the application was able to deploy without a problem.
I had a Package.describe() method call that was throwing an error which helped me track down this problem.

Meteor with cloud9

When trying to run meteor in cloud9 I encounter one of the following errors:
Running the older modified version from cloud9 I get the error:
No dependency info in bundle. Filesystem monitoring disabled.
=> Errors prevented startup:
Exception while bundling application:
Error: Package not found: standard-app-packages
at self.api.use (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/tools/bundler.js:113:17)
at Array.forEach (native)
at Function._.each._.forEach (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at Object.self.api.use (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/tools/bundler.js:110:9)
When I try running the lastest version, I get an error from cloud9:
Cloud9 Error: you may be using the wrong PORT & HOST for your server app
Node: use 'process.env.PORT' as the port and 'process.env.IP' as the host in your scripts. See also https://c9.io/site/blog/2013/05/can-i-use-cloud9-to-do-x/
In both cases, I clone the corresponding GitHub repository and run export BIND_IP=$IP as well as export PORT=20000 (as it is described in on several posts). I also gave up the hope using the default MongoDB server and am instead exporting MONGO_URL to a free database hosted on https://www.mongohq.com/.
I've also tried to merge the pull request from cloud9's meteor version to the master, but those files don't even exist anymore. Everything else I could find was about Meteor version 0.6.5 and 0.5
Trying to modify the latest Meteor-version I looked for the httpServer.listen call, but I found only one in meteor/packages/webapp/webapp_server.js, and it seems that the cloud9 error is thrown before that part of code is reached (if it is ever reached). So that there must be a another piece of code which is bound to the wrong address or port.
The plugins I use are:
standard-app-packages
insecure
preserve-inputs
underscore
backbone
jquery
accounts-ui
accounts-base
accounts-password
accounts-facebook
accounts-google
coffeescript
Update:
After some more hours looking for a solution, I got much further. The problem was in meteor/tools/run-proxy.js:
In line 94 you can see: self.server.listen(self.listenPort, function () { here is the corresponding IP-address missing to which the server should bind itself. Now meteor used to use an environmental variable BIND_IP which we could introduce here again, but this would have unnecessary additional changes on cloud9, since they export the current IP address to which a service should bind itself in the IP variable. So I changed the line in question to: self.server.listen(self.listenPort, process.env.IP, function () {
I've also additionally modified meteor/tools/run-all.js, since I wasn't sure if the correct port parameter is used. On line 24 I exchanged var listenPort = options.port; with var listenPort = process.env.PORT;
While I can now finally start the application, it is still not running and I'm getting the following output:
=> Running Meteor from a checkout -- overrides project version (0.7.2)
[[[[[ ~/<PROJECT_ID>/<PROJECT_NAME> ]]]]]
=> Started proxy.
W20140321-22:31:42.591(-4)? (STDERR)
W20140321-22:31:43.036(-4)? (STDERR) events.js:72
W20140321-22:31:43.037(-4)? (STDERR) throw er; // Unhandled 'error' event
W20140321-22:31:43.037(-4)? (STDERR) ^
Cloud9 Error: you may be using the wrong PORT & HOST for your server app
Node: use 'process.env.PORT' as the port and 'process.env.IP' as the host in your scripts. See also https://c9.io/site/blog/2013/05/can-i-use-cloud9-to-do-x/
W20140321-22:31:43.108(-4)? (STDERR) Error: listen EACCES
W20140321-22:31:43.109(-4)? (STDERR) at errnoException (net.js:901:11)
W20140321-22:31:43.109(-4)? (STDERR) at Server._listen2 (net.js:1020:19)
W20140321-22:31:43.111(-4)? (STDERR) at listen (net.js:1061:10)
W20140321-22:31:43.111(-4)? (STDERR) at net.js:1143:9
W20140321-22:31:43.112(-4)? (STDERR) at dns.js:72:18
W20140321-22:31:43.112(-4)? (STDERR) at process._tickCallback (node.js:415:13)
=> Exited with code: 8
However meteor doesn't crash and the exceptions keep coming in one after another. That's why I first thought, the exception is due to an authentication error on MongoDB, since also Error-Code 8 for MongoDB is authentication error, but this is what I get when I use an invalid username + password on my MongoHQ-hosted database:
[...]
=> Started proxy.
W20140321-22:54:17.282(-4)? (STDERR)
W20140321-22:54:18.700(-4)? (STDERR) /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/mongo_client.js:400
W20140321-22:54:18.777(-4)? (STDERR) throw err
W20140321-22:54:18.778(-4)? (STDERR) ^
W20140321-22:54:18.778(-4)? (STDERR) MongoError: auth fails
W20140321-22:54:18.778(-4)? (STDERR) at Object.toError (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/utils.js:110:11)
W20140321-22:54:18.779(-4)? (STDERR) at /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/auth/mongodb_cr.js:34:33
W20140321-22:54:18.779(-4)? (STDERR) at /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/db.js:1670:9
W20140321-22:54:18.779(-4)? (STDERR) at Server.Base._callHandler (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
W20140321-22:54:18.780(-4)? (STDERR) at /var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
W20140321-22:54:18.780(-4)? (STDERR) at MongoReply.parseBody (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
W20140321-22:54:18.780(-4)? (STDERR) at null.<anonymous> (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
W20140321-22:54:18.781(-4)? (STDERR) at EventEmitter.emit (events.js:95:17)
W20140321-22:54:18.781(-4)? (STDERR) at null.<anonymous> (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/packages/mongo-livedata/.build/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)
W20140321-22:54:18.782(-4)? (STDERR) at EventEmitter.emit (events.js:98:17)
=> Exited with code: 8
This error is thrown in meteor/packages/mongo-livedata/mongo_driver.js at line 149:
147: MongoDB.connect(url, mongoOptions, function(err, db) {
148: if (err)
149: throw err;
150: self.db = db;
This is also OK, however I couldn't find where the other error comes from, which occurs, when my credentials are correct.
I just ran into similar issues initially, but the latest version of Meteor (0.9.0) makes this easy at least.
meteor run --port=$IP:$PORT
Seems to do the trick (at least so far)
This is doc'd in
meteor help run
hth
Andy
Ok, so actually the first part of the question is the correct answer, if I hadn't done it the other way around:
BIND_IP is used within meteor/packages/webapp/webapp_server.js, but not in meteor/tools/run-proxy.js. However both need to bind to cloud9's 'IP'-variable.
So to solve this issue, simply update the proxy, similar as I did it, to use the correct IP-address: self.server.listen(self.listenPort, process.env.IP, function () {
and just write in your .bashrc export BIND_IP=$IP
now everything works smoothly (provided, that you use a mongodb outside of cloud9)
I've summarised the necessary steps in my blog: http://peter.grman.at/how-to-run-meteor-in-cloud9/
meteor works very nice in c9.io, i am working in c9.io with metor. just following the steps.
select workshop as nodejs.
in terminal write the command "curl https://install.meteor.com/ | sh"
in terminal write $ meteor create newapp(your main application folder name)
in terminal write cd newapp
in terminal write $ meteor -p 8080 (note -p or --port, if you using port as 300 that not working properly in c9.io . so you should using port as 8080 or 8081 or 8082)
after few seconds you get a link app running at: localhost:8080
click the link and open it.
Meteor 1.4:
At first, I tried a lot of different variations, with and without the --port flag mentioned in Andrew's answer.
If I only ran the meteor command without any flag, the app would successfully start on port 3000, but apparently that port can't be used in Cloud9 (https://docs.c9.io/docs/multiple-ports)
If I used the --port flag, meteor would just hang on "Starting your app"
Most likely something got stuck along the way (with all the retries), because what probably finally fixed it was to run a meteor reset before starting the app (Meteor application - Stuck at "Starting your app" when trying to run):
...$ sudo meteor reset
...$ sudo meteor --port=$IP:$PORT
If that doesn't help, I had also added some detailed logging on the attempt that finally worked (see this meteor forum post: Meteor stuck at starting your app). Try this if you're still stuck:
...$ sudo meteor reset
...$ METEOR_PROFILE=1
...$ METEOR_LOG=debug
...$ sudo meteor --port=$IP:$PORT --verbose
After it worked the first time, I can now start the app with only one command:
...$ sudo meteor --port=$IP:$PORT

Meteor unable to run application after adding ui-accounts

I decided to try out Meteor and found myself a tutorial to follow.
So as one does I googled "Meteor tutorials" and this one is at the top of the results list:
http://www.smashingmagazine.com/2013/06/13/build-app-45-minutes-meteor/
Hey all!
So - I start following the tutorial but as soon as I get to step 2 meteor isn't able to run my application anymore.
The log is as follows:
Your app is crashing. Here's the latest log.
W2047-00:56:09.699(0)? (STDERR) /home/vidirr/.meteor/packages/mongo- livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/mongo_client.js:359
W2047-00:56:09.700(0)? (STDERR) throw err
W2047-00:56:09.700(0)? (STDERR) ^
W2047-00:56:09.702(0)? (STDERR) Error: failed to connect to [127.0.0.1:3002]
W2047-00:56:09.704(0)? (STDERR) at null.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/server.js:540:74)
W2047-00:56:09.704(0)? (STDERR) at EventEmitter.emit (events.js:106:17)
W2047-00:56:09.704(0)? (STDERR) at null.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)
W2047-00:56:09.705(0)? (STDERR) at EventEmitter.emit (events.js:98:17)
W2047-00:56:09.705(0)? (STDERR) at Socket.<anonymous> (/home/vidirr/.meteor/packages/mongo-livedata/45bb567dec/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:478:10)
W2047-00:56:09.705(0)? (STDERR) at Socket.EventEmitter.emit (events.js:95:17)
W2047-00:56:09.705(0)? (STDERR) at net.js:441:14
W2047-00:56:09.706(0)? (STDERR) at process._tickCallback (node.js:415:13)
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
I checked in the the IRC room but they hadn't heard of the problem before.
TL;DR:
I create a new app:
meteor create newApp
I change into the new directory and run the app:
cd newApp
meteor
Everything works fine.
I kill the app, and add two smart-packages to my app:
meteor add accounts-ui
meteor add accounts-twitter
-(also tried accounts-facebook, same results).
I start the app - and it crashes.
Info:
Running a 32-bit distribution of Arch.
HDD space is fine.
RAM usage is about 1GB of 3GB before starting app - don't see any spikes.
Nothing seems to be bound to port 3002, checked using netstat.
Tried manually running mongod before starting app - no change.
Tried creating multiple projects - no change.
Removed ~/.meteor, reinstalled meteor, started a new project - no change.
Basically - I'm stumped. Seeing that I haven't actually written any code at all, I'm kinda blaming this on something else.
And since the guys in the IRC channel didn't see anything wrong with those steps, I'm also blaming it on something else then the tutorial.
Any ideas?
Best regards,
Víðir
For formalities, I'll place it here then.
Try restarting the PC
There is something using port 3002 and is not releasing it or Meteor just can't use port 3002 for some reason. If you can't manage to get hold of what's holding port 3002, then restarting the PC should do.
I had the similar problem with the latest Meteor 1.0 installation on my OS X 10.9: any application crashed after adding ui-accounts. In my case some other libs were involved and simple restart had no effect. What I had to do is completely remove Meteor and then install it again.
rm -rf ~/.meteor
rm -rf /usr/local/bin/
curl https://install.meteor.com/ | sh

Resources