Error deploying a meteor app - deployment

When deploying a meteor app, I run into this error:
Errors prevented deploying:
Exception while bundling application:
Error: EACCES, permission denied '/Users/andyjiang/Developer/hackathon/meteor/instachat/.meteor/local/build_tar/bundle/app/instachat.js'
at Object.fs.unlinkSync (fs.js:582:18)
at Object._.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:280:10)
at _.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:276:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/andyjiang/.meteor/tools/11f45b3996/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:274:9)
at _.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:276:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/andyjiang/.meteor/tools/11f45b3996/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:274:9)
at _.extend.write_to_directory (/Users/andyjiang/.meteor/tools/11f45b3996/tools/bundler.js:808:11)
at Object.exports.bundle (/Users/andyjiang/.meteor/tools/11f45b3996/tools/bundler.js:887:12)
at deployToServer (/Users/andyjiang/.meteor/tools/11f45b3996/tools/deploy.js:95:24)
at deployCmd (/Users/andyjiang/.meteor/tools/11f45b3996/tools/deploy.js:78:7)
at exports.inFiber (/Users/andyjiang/.meteor/tools/11f45b3996/tools/fiber-helpers.js:24:12)
/Users/andyjiang/.meteor/tools/11f45b3996/tools/fiber-helpers.js:25
}).run();
^
Error: EACCES, permission denied '/Users/andyjiang/Developer/hackathon/meteor/instachat/.meteor/local/build_tar/bundle/app/instachat.js'
at Object.fs.unlinkSync (fs.js:582:18)
at Object._.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:280:10)
at _.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:276:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/andyjiang/.meteor/tools/11f45b3996/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:274:9)
at _.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:276:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/andyjiang/.meteor/tools/11f45b3996/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:274:9)
at _.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:276:15)
at Array.forEach (native)
at Function._.each._.forEach (/Users/andyjiang/.meteor/tools/11f45b3996/lib/node_modules/underscore/underscore.js:79:11)
at Object._.extend.rm_recursive (/Users/andyjiang/.meteor/tools/11f45b3996/tools/files.js:274:9)
at deployToServer (/Users/andyjiang/.meteor/tools/11f45b3996/tools/deploy.js:101:11)
at deployCmd (/Users/andyjiang/.meteor/tools/11f45b3996/tools/deploy.js:78:7)
at exports.inFiber (/Users/andyjiang/.meteor/tools/11f45b3996/tools/fiber-helpers.js:24:12)
The app runs fine locally. I've deployed other Meteor apps without any issues, as well. Any idea what the error could be?
Thanks,
Andy

Related

Meteor error - Storing tasks in a collection

I am following the meteor site tutorial (https://www.meteor.com/tutorials/blaze/collections).
But when you add the line:
export const Tasks = new Mongo.Collection('tasks');
I get the following error:
/Users/user/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:313
throw(ex);
^
MongoError: failed to connect to server [localhost:27017] on first connect
at Object.Future.wait (/Users/user/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:449:15)
at new MongoConnection (packages/mongo/mongo_driver.js:216:27)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
at new Mongo.Collection (packages/mongo/collection.js:103:40)
at meteorInstall.imports.api.tasks.js (imports/api/tasks.js:4:14)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at Module.Mp.import (/Users/user/.meteor/packages/modules/.0.7.6_1.j54juu++os+web.browser+web.cordova/npm/node_modules/reify/lib/runtime.js:70:16)
- - - - -
at [object Object].<anonymous> (/Users/user/.meteor/packages/npm-mongo/.1.5.50.1g0yl8n++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/topologies/server.js:313:35)
at emitOne (events.js:77:13)
at [object Object].emit (events.js:169:7)
at [object Object].<anonymous> (/Users/user/.meteor/packages/npm-mongo/.1.5.50.1g0yl8n++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:260:12)
at [object Object].g (events.js:260:16)
at emitTwo (events.js:87:13)
at [object Object].emit (events.js:172:7)
at Socket.<anonymous> (/Users/user/.meteor/packages/npm-mongo/.1.5.50.1g0yl8n++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/connection.js:162:49)
at Socket.g (events.js:260:16)
at emitOne (events.js:77:13)
Exited with code: 1
Your application is crashing. Waiting for file change.
The line in the tutorial:
export const Tasks = new Mongo.Collection('tasks');
Is different from your line:
Export Tasks const = new Mongo.Collection ('tasks');
The goal of the code is to initialize a new constant, Tasks, set it to a new Mongo.Collection, and then export it.

REST route not working with Meteor's iron router

I'm trying to create a simple REST api in my Meteor app. Using the exact example from the doc
Router.route('/webhooks/stripe', { where: 'server' })
.get(function () {
// GET /webhooks/stripe
})
.post(function () {
// POST /webhooks/stripe
})
.put(function () {
// PUT /webhooks/stripe
})
throw an error:
=> Exited with code: 8
W20160116-16:39:15.200(-8)? (STDERR)
W20160116-16:39:15.201(-8)? (STDERR) /Users/me/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20160116-16:39:15.201(-8)? (STDERR) throw(ex);
W20160116-16:39:15.201(-8)? (STDERR) ^
W20160116-16:39:15.204(-8)? (STDERR) TypeError: Object [object Object] has no method 'get'
W20160116-16:39:15.205(-8)? (STDERR) at lib/router.js:9:4
W20160116-16:39:15.205(-8)? (STDERR) at /Users/me/repo/.meteor/local/build/programs/server/app/lib/router.js:25:4
W20160116-16:39:15.205(-8)? (STDERR) at /Users/me/repo/.meteor/local/build/programs/server/boot.js:242:10
W20160116-16:39:15.205(-8)? (STDERR) at Array.forEach (native)
W20160116-16:39:15.205(-8)? (STDERR) at Function._.each._.forEach (/Users/me/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160116-16:39:15.205(-8)? (STDERR) at /Users/me/repo/.meteor/local/build/programs/server/boot.js:137:5
Any idea?
It seems to me that you perhaps missed to install iron-router?
.. at /Users/me/repo/.meteor/local/build/programs/server/app/lib/router.js:25:4
This seems to indicate that Router is still the meteor own router, not iron-router, which lives somewhere in
/Users/me/repo/.meteor/local/build/programs/server/packages
Make sure you ran:
meteor add iron:router
You can see which packages are already installed using meteor list.

protractor sets error without opening browser

i download a new ionic project and i am trying to test the header contains these elements ""
my config file is
exports.config = {
framework: 'jasmine2',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['../www/head.spec.js'],
multiCapabilities: [
{
browserName: 'chrome'
}]
}
named this as e2e.js
my test case file is
describe('header Module', function(){
var header;
beforeEach(function() {
header = element(by.css('title'));
});
it('should check title text',function(){
expect(header.getText()).toContain('Ionic Blank Starter');
});
});
and i named this as head.spec.js
my issue is that i could see the browser opened and my protractor sends an error msg
empresss-Mac-mini:myApp admin$ protractor test/e2e.js
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest. (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:172:16)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:259:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at doNTCallback2 (node.js:439:9)
at process.tickCallback (node.js:353:17)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
at [object Object].Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
at [object Object].DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at [object Object].Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.js:182:37)
at /usr/local/lib/node_modules/protractor/lib/runner.js:263:21
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
could someone help to fix this issue
when i try to webdriver-manager update err msg is displayed
empresss-Mac-mini:~ admin$ webdriver-manager update
fs.js:799
return binding.mkdir(pathModule._makeLong(path),
^
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protractor/selenium'
at Error (native)
at Object.fs.mkdirSync (fs.js:799:18)
at Object.<anonymous> (/usr/local/lib/node_modules/protractor/bin/webdriver-manager:126:6)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:134:18)
at node.js:961:3
empresss-Mac-mini:~ admin$

Error referring to the same Mongo.Collection from two .js files in Meteor

I have this line in two .js files in Meteor:
merchants = new Mongo.Collection('merchants');
It blows up with the error message below. Why?
Tried adding var
Removing the line in one of the files helps.
What am I doing wrong?
`W20150614-11:20:50.527(-7)? (STDERR) at app\signUp\signUp.js:1:48
W20150614-11:20:50.527(-7)? (STDERR) at app\signUp\signUp.js:54:3
W20150614-11:20:50.529(-7)? (STDERR) at E:\work\meteor3\app\merchant\.m
eteor\local\build\programs\server\boot.js:222:10
W20150614-11:20:50.529(-7)? (STDERR) at Array.forEach (native)
W20150614-11:20:50.529(-7)? (STDERR) at Function._.each._.forEach (C:\Users\
I\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bund
le\server-lib\node_modules\underscore\underscore.js:79:11)
W20150614-11:21:03.189(-7)? (STDERR)
W20150614-11:21:03.190(-7)? (STDERR) C:\Users\I\AppData\Local\.meteor\packages\m
eteor-tool\1.1.3\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\
future.js:245
W20150614-11:21:03.191(-7)? (STDERR)
throw(ex);
W20150614-11:21:03.191(-7)? (STDERR)
^
W20150614-11:21:03.192(-7)? (STDERR) Error: A method named '/merchants/insert' is already defined
W20150614-11:21:03.193(-7)? (STDERR) at packages/ddp/livedata_server.js:1461
:1
W20150614-11:21:03.193(-7)? (STDERR) at Function._.each._.forEach (packages/
underscore/underscore.js:113:1)
W20150614-11:21:03.194(-7)? (STDERR) at [object Object]._.extend.methods (pa
ckages/ddp/livedata_server.js:1459:1)
W20150614-11:21:03.194(-7)? (STDERR) at [object Object].Mongo.Collection._de
fineMutationMethods (packages/mongo/collection.js:904:1)
W20150614-11:21:03.195(-7)? (STDERR) at new Mongo.Collection (packages/mongo
/collection.js:209:1)
W20150614-11:21:03.196(-7)? (STDERR) at app\signUp\signUp.js:1:48
W20150614-11:21:03.196(-7)? (STDERR) at app\signUp\signUp.js:54:3
W20150614-11:21:03.197(-7)? (STDERR) at E:\work\meteor3\app\merchant\.m
eteor\local\build\programs\server\boot.js:222:10
W20150614-11:21:03.198(-7)? (STDERR) at Array.forEach (native)
W20150614-11:21:03.199(-7)? (STDERR) at Function._.each._.forEach (C:\Users\
I\AppData\Local\.meteor\packages\meteor-tool\1.1.3\mt-os.windows.x86_32\dev_bund
You only need one new Mongo.Collection declaration per collection in meteor app.

How can I do a Facebook Connect with meteor.js?

I always get the following error when I do a FacebookConnect:
W20140817-21:48:56.623(2)? (STDERR) TypeError: Cannot call method 'remove' of undefined
W20140817-21:48:56.624(2)? (STDERR) at app/server/oauth.js:2:36
W20140817-21:48:56.624(2)? (STDERR) at app/server/oauth.js:11:3
W20140817-21:48:56.625(2)? (STDERR) at /Users/username/copro/chatapp/.meteor/local/build/programs/server/boot.js:161:10
W20140817-21:48:56.625(2)? (STDERR) at Array.forEach (native)
W20140817-21:48:56.625(2)? (STDERR) at Function._.each._.forEach (/Users/username/.meteor/tools/cef2bcd356/lib/node_modules/underscore/underscore.js:79:11)
W20140817-21:48:56.625(2)? (STDERR) at /Users/username/copro/chatapp/.meteor/local/build/programs/server/boot.js:82:5
How can I fix this error?