Page not launching with AngularSeed on Firebase URL - javascript

I followed in detail the five minute tutorial at: https://www.youtube.com/watch?v=hj0LyZ13D3Q
I executed the following steps:
I set up an account at Firebase.com
I set up a new app within my Firebase account
I opened my terminal and:
sudo npm install -g firebase-tools
firebase login (followed by email and password for firebase.com)
firebase bootstrap
selected the new app as listed from Firebase
chose the angular template
cd to the newly created directory
firebase login
On the video, the new site is up and running at https://newapp.firebaseapp.com
In my case I get nothing but a blank screen and my JS console provides nothing but a series of errors:
GET https://myapp.firebaseapp.com/bower_components/html5-boilerplate/css/normalize.css myapp.firebaseapp.com/:9
GET https://myapp.firebaseapp.com/bower_components/html5-boilerplate/css/main.css myapp.firebaseapp.com/:10
GET https://myapp.firebaseapp.com/bower_components/angular/angular.js myapp.firebaseapp.com/:33
GET https://myapp.firebaseapp.com/bower_components/html5-boilerplate/js/vendor/modernizr-2.6.2.min.js myapp.firebaseapp.com/:12
GET https://myapp.firebaseapp.com/bower_components/angular-route/angular-route.js myapp.firebaseapp.com/:34
GET https://myapp.firebaseapp.com/bower_components/firebase/firebase.js myapp.firebaseapp.com/:35
GET https://myapp.firebaseapp.com/bower_components/firebase-simple-login/firebase-simple-login.js myapp.firebaseapp.com/:36
GET https://myapp.firebaseapp.com/bower_components/angularfire/dist/angularfire.js myapp.firebaseapp.com/:37
Uncaught ReferenceError: angular is not defined app.js:4
Uncaught ReferenceError: angular is not defined config.js:4
Uncaught ReferenceError: angular is not defined controllers.js:5
Uncaught ReferenceError: angular is not defined decorators.js:9
Uncaught ReferenceError: angular is not defined directives.js:6
Uncaught ReferenceError: angular is not defined filters.js:5
Uncaught ReferenceError: angular is not defined routes.js:3
Uncaught ReferenceError: angular is not defined services.js:6
Uncaught ReferenceError: angular is not defined firebase.utils.js:3
Uncaught ReferenceError: angular is not defined simpleLogin.js:2
Uncaught ReferenceError: angular is not defined
I'm using Node v0.10.32, Firebase Command Line Tools Version 1.1.2

For whatever reason, the tutorial omited the bower angular bower_components. https://github.com/firebase/generator-angularfire
I copied and pasted them from another project and put the corresponding scripts from the other project in the head of my index.html and it works.

Related

" 'app' is undefined " when developing an Office add-in

So I am learning how to develop an MS Project add-in.
I was successful in deploying the tutorial (yayy!): https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/project-quickstart
Then I replaced the html and the js code with the example code from here: https://dev.office.com/reference/add-ins/shared/projectdocument.gettaskbyindexasync
And it stopped working!
I started a new project from scratch. Again, as in the tutorial, "Office Add-in project using Jquery framework", "Javascript" as selected options.
And it still didn't work.
Error message from F12 dev tools:
jQuery.Deferred exception: 'app' is undefined ReferenceError: 'app' is undefined
at Anonymous function (eval code:14:13)
at mightThrow (https://localhost:3000/node_modules/jquery/dist/jquery.js:3534:10)
at Anonymous function (https://localhost:3000/node_modules/jquery/dist/jquery.js:3602:12) undefined
SCRIPT5009: 'app' is undefined
jquery.js (3827,3)
The error is spawned from the following row from the JS code:
app.initialize();
There is no "app.initialize();" in the tutorial. If I decide to delete this row, the error goes away (naturally), but then interacting with the functionality spawns another error message:
Unable to get property 'push' of undefined or null reference
Then I tried to define some 'app' Object.
I initialized it with
var app = Object.context;
The error then is:
Unable to get property 'initialize' of undefined or null reference
I am still trying to figure out, where this 'app' Object comes from. Or at least, how can I define it properly. Any ideas?

Uncaught ReferenceError: Meteor is not defined

I'm following a tutorial to create a Meteor app and I've been having the same error regarding different things in the developer console.
> Meteor.users.find().count();
VM2034:1 Uncaught ReferenceError: Meteor is not defined(…)(anonymous function) # VM2034:1
> Session.set('pageTitle', 'A different title');
VM2035:1 Uncaught ReferenceError: Session is not defined(…)
From researching the problem, the 2 solutions that come up are: (1) doing
meteor add session
which I have done; (2) updating the Meteor version but I am running Meteor 1.3.3. Neither works.
EDIT: After doing meteor update, the Meteor error disappeared once but came back the second time I tried a command based on Meteor.
Any idea on how to solve this?
If you are trying to set the session outside the client folder you will get this error. Which is why you must do:
if(Meteor.isClient) {
Session.set('pageTitle', 'A different title');
}
Then you can check it worked simple write in console:
Session.get('pageTitle')
Will output: "A different title"
Good luck!

Ember 2.0 upgrade errors: Unexpected strict mode reserved word & handlebars precompile error

I'm trying to upgrade an ember-rails app from ember v1.13 to v2.0. The app loads and templates render in ember 1.13 and there are no deprecations coming through to the console. When I bump the version to 2.0.0 (through the ember-source gem), the app doesn't seem to load and no templates are rendered. Instead, this error is in the JS console:
Uncaught Error: ExecJS::RuntimeError: SyntaxError: Unexpected strict mode reserved word
If I refresh the page, suddenly I'm hit with a handlebars precompile error:
Uncaught Error: Barber::PrecompilerError: Pre compilation failed for:
(prints out file contents)
Compiler said: ReferenceError: Handlebars is not defined
Any thoughts on what could be the cause of this? Any input would be greatly appreciated, as I've been stuck on this for hours!!!

Discover Meteor, Chapter 3-5: plain grey screen and no data

This is a follow-up question on Meteor: "=> Exited with code: 8" error.
Since Chapter 3 of Discover Meteor, whenever I run the server and visit the http://localhost:3000/ URL (or any other page of the app), I only get a plain, grey screen, with nothing on it:
I decided to go on with the tutorial, hoping that the next chapters would result in fixing what was wrong by updating some files, but it did not.
There is no error in the server log, so I cannot reproduce them here.
However, you can find all the files of the project on GitHub: https://github.com/thibaudclement/microscope
UPDATE: here are the client-side console logs:
Uncaught TypeError: Template.__create__ is not a function
meteor.js:225 Uncaught TypeError: Cannot read property 'prototype' of undefined
iron-router.js:1475 Uncaught TypeError: undefined is not a function
global-imports.js:3 Uncaught TypeError: Cannot read property 'RouteController' of undefined
template.layout.js:2 Uncaught ReferenceError: Template is not defined
template.loading.js:2 Uncaught ReferenceError: Template is not defined
template.post_item.js:2 Uncaught ReferenceError: Template is not defined
template.post_page.js:2 Uncaught ReferenceError: Template is not defined
template.posts_list.js:2 Uncaught ReferenceError: Template is not defined
template.main.js:2 Uncaught ReferenceError: Template is not defined
router.js:1 Uncaught ReferenceError: Router is not defined
post_item.js:1 Uncaught ReferenceError: Template is not defined
posts_list.js:1 Uncaught ReferenceError: Template is not defined
posts.js:1 Uncaught ReferenceError: Meteor is not defined
meteor.js:888 Exception in defer callback: TypeError: Cannot read property 'insert' of undefined
at Utils.extend.autoRender (http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1636:17)
at http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1465:16
at _.extend.withValue (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:955:17)
at http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:435:45
at Object.<anonymous> (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:983:22)
at onGlobalMessage (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:372:23)
Any idea of what I am doing wrong?
Or at least, where I should start looking to find what is going wrong?
Problem may be you're following old version of the book or with microscope(not sure)
I cloned your app and tried to run
in your .meteor/packages file
change
iron-router
spin
to
iron:router
sacha:spin
it is working fine for me afer these changes

MeteorJS Uncaught SyntaxError: Unexpected end of input

I have this problem with meteor and the error in the client browser is this
underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18:1110 Uncaught SyntaxError: Unexpected end of input
meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:21 Uncaught ReferenceError: Package is not defined
json.js?e22856eae714c681199eabc5c0710b904b125554:21 Uncaught ReferenceError: Package is not defined
base64.js?1a63019243b73298e2964e6d4680f25bca657726:21 Uncaught ReferenceError: Package is not defined
ejson.js?71047b64b5196348bdbe5fd5eea9ac97a5a9eb14:21 Uncaught ReferenceError: Package is not defined
logging.js?07e201b648f16be8435a4f666156995eeda0c750:21 Uncaught ReferenceError: Package is not defined
reload.js?da8974b7231dd8c0caccb5f322dcf97329d486d1:21 Uncaught ReferenceError: Package is not defined
tracker.js?6d0890939291d9780f7e2607ee3af3e7f98a3d9c:21 Uncaught ReferenceError: Package is not defined
random.js?fe7b46080c91ce482acf6fc326afbc5b176f0502:21 Uncaught ReferenceError: Package is not defined
retry.js?1f1dd2c35d300110fdaba51ce4473583bc3bf031:21 Uncaught ReferenceError: Package is not defined
but in the server there is no error. Any ideas?
There is a proxy or CDN in between you and the server or your browser cache isn't refreshing the file.
You've requested meteor.js which isn't a complete file (cut off half way). This is is the cause of the Unexpected End of file error.
Clear your cache, or force your proxy/CDN to refresh the file's record.

Categories