Posts

Showing posts with the label Meteor

npm ERR! Error: EACCES, mkdir '/home/user/.npm/async/0.9.0'

When i am running npm it show this error that EACCES npm-container: updating npm dependencies -- request... npm ERR! Error: EACCES, mkdir '/home/sagar/.npm/async/0.9.0' npm ERR!  { [Error: EACCES, mkdir '/home/sagar/.npm/async/0.9.0'] npm ERR!   errno: 3, npm ERR!   code: 'EACCES', npm ERR!   path: '/home/sagar/.npm/async/0.9.0', npm ERR!   parent: 'form-data' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Linux 3.13.0-24-generic npm ERR! command "/home/sagar/.meteor/packages/meteor-tool/.1.0.40.1o762tv++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/bin/node" "/home/sagar/.meteor/packages/meteor-tool/.1.0.40.1o762tv++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/bin/npm" "install" "request@2.53.0" npm ERR! cwd /home/sagar/Desktop/mymeteor/packages/npm-container/.npm/package-new-acq805 npm ER

What is the problem with Meteor SEO?

Meteor SEO problem Here i will tell you the problem with SEO and Meteor Meteor does not have Problem with SEO  it has problem with SEO Page Okay let me explain:- If you run the page on browser of Meteor site and will check the source code by Ctrl+U then you will find that there is only some css and js file and Some JaveScript Code HTML does not render on HTML file This is the main problem with Meteor Pages When Good crawl the page and it does not found the html on pages then it google thinks that it is a blank page and does not crawl the content. So in SEO purpose Google does not crawl the content In Technical Way: if google visits your Meteor Site it Crawl the html document on your server show it and tries to understand what your document is about in page. If a user search on google for some keyword, google may think “that a page i had crawled that day, I think this can be answer the users request the best.” The thing with Meteor is, that it is a client-heavy web ap

How to use Sass or Scss in a Meteor app?

Use Sass or scss in Meteor app To use Sass or Scss file in Meteor First of all you need to add scss or sass package in Meteor Run this command first: mrt add scss Now create a scss file inside your stylesheet folder or anywhere you want to add Like scss_style.scss You can add a css style code to test like h1{ color:red !important; } Now restart your app. I hope it is working now. But this will not work after 0.8 version of meteor Please comment or share this post to inspire me :)

How to show index for an array in loop in the template of Meteor?

Show indexing in template of Meteor for a list of array in loop You can use something like this: Like you have a template name home.html with home template name Now you can write this code for indexing or index to show listing home.js var tot = 0; Template.home.helpers({   listIndex: function(num){     tot = tot+num;     return tot;   }  }); Template.home.destroyed  = function(){   tot = 0; }; Now you can call this function from your template home.html like this: {{listIndex 1}} Hope this will work for you :)

How to use if else condition in Meteor Template?

You can use if else condition in Meteor HTML Template by other option Here is one option to use it Like: You can use Helpers of meteor to use if else condition which you can use in your HTML file. Here is Example: Project/helpers/Spacebars.js You can write this code in this helper UI.registerHelper('addChangeClass', function(valchange) { if(valchange>1) { return "<span style='color:green;'>Yes</span>"; }else { return valchange; } });  Now you can use this function in your template HTML file <td align="right">{{{addChangeClass -34}}}</td> or <td align="right">{{{addChangeClass number}}}</td> I used {{{ three curly bracket to render HTML in Meteor HTML Template.   

How to Return HTML in Meteor Template?

Render HTML in Meteor Template Use {{{variable}}} instead of {{variable}} to make sure there should not escape. With the three curly brackets you can render HTML in meteor template.

What is fixtures in Meteor?

Fixtures in Meteor Basically in short fixtures is js file where you can set default data which will insert automatically when the app runs. Like when you created a app and you want that when you will reset your database or delete all record from database then by default some record became inserted in collection of mongodb. like you can add some data in fixtures if (user.find().count() === 0) {   user.insert({     "name": "Industria de Diseno Textil SA",     "country": "ES",     active:false   });   userinsert({     "name": "Under Armour Inc.",     "country": "US",     active:false   });   user.insert({     "name": "Nike Inc.",     "country": "US",     active:false   }); }  So as you set code in fixures that will check if user collection does not have any record then by default it will insert three record when app

How to write MongoDB query in Meteor?

How to write MongoDB find query in Meteor? Or  How to write MongoDB update query in Meteor? First of all find query  Select symbol.yahoo from user where active='true' user.find({active:true},{fields:{'symbol.yahoo':1}}); Update query in MongoDB Meteor update user set open_at=9pm and trade_date ='2012-12-20' where symbol.yahoo='meteor'  var updata = {             open_at : '9pm',             trade_date : '20122-12-30' } user.update({'symbol.yahoo':'meteor'}, {$set:updata});

How to start Meteor APP?

Image
First of all you need a platform where you can start a Meteor APP You can use Linux or any other platform. If you will use Windows that you can face lots of technical issue of installation issue. So there is very basic tutorial from where you can easily learn Meteor. Step1: www.nitrous.io open this link and register here and login This site provide already set up meteor environment After login create a box and choose Node.js environment. Now you have box somthing like this. Click on IDE step2: You will see somthing like this On the left hand sidebar you will see the directory related to your app. In the bottom you can run linux command 3. Now you need to run in the console a command which install all remaing parts of meteor app parts install meteor Now you can follow this link for more info www.discovermeteor.com/blog/meteor-nitrous/

gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now Installation failed.

While Installing Meteor i am getting this Error on my linux server or ubuntu I tried to figure out to get rid of this problem but unable to success so finally i found a solution. I think you can be stuck in this problem. Mostly this problem occurs when you try to install the  Meteor on your ubuntu or linux server. When you run this command  curl https://install.meteor.com | sh It shows some process and showed you that given error below gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now Installation failed. Now here is the answer that how can you solve this problem Open your terminal where you running this command Before run this command curl https://install.meteor.com | sh You need to run this command before above command echo tlsv1 > $HOME/.curlrc Now you can run this command to install Meteor   curl https://install.meteor.com | sh Hope problem is sloved.     If this works for you then please submit a