Collection become undefined after deploy on Meteor.com - javascript

On my computer it's work well. After deploying on meteor.com I get error.
Creating collection look like this ( /lib/collections/messages.js )
Messages = new Meteor.Collection('messages');
On browser console after input
Messages.insert({})
I get
Uncaught ReferenceError: Messages is not defined

Its very likely you have a syntax error somewhere in your code.
If you check up your browser console the syntax error is visible.
On your localhost the files are not concatenated into one single js file, so if there is an error somewhere, then the issue isn't too bad & your app will run fine, mostly.
The thing is when your entire project is concatenated into one single js file then when there is an error higher up in your code, the downstream code will not execute. So the code at /lib/collections/messages.js does not run & this is why it is not defined.
The error is likely to be something like cannot read null of undefined or uncaught reference error or something like that. If you solve whatever is causing this error and redeploy your app.

Related

Cannot read property 'lists' of undefined

I am trying to create a web application that mimics trello. I keep getting this error and im not sure how to fix it. The code works fine in another project but not when i try and add it to this new project. ALL dependencies are updated. I am running it on google chrome. I read it might be a problem with chrome?
This is the error that I am receiving on my browser. There are no errors in my IDE.
This is the code that is producing this error. The code works fine in another IDE but once I try to integrate the component into my new app it crashes.
Make sure you are getting array in list key in "board" Props and try to use optional Channing
{
boar?.list?.map(..)
}
Your board props is undefined that's why you're getting this error.

Cypress.io: Server Error | 404 - File or director not found

I'm currently trying to automate the test for a pretty big webapplication (DMS) Document Management System. To explain the system a little bit: There is a loadbalancer which connect to one of two frontends. To be sure that will be no problems in my test I directly try to access frontend one. Now to my problem:
When trying to run all the tests (around 20 spec-Files) with the Test Runner and also when trying to run the tests via console with the following command: .\node_modules\.bin\cypress run --spec "cypress/integration/Basis/**/*" --browser chrome
Sometimes after a cy.visit() a Server Error comes up. That error also stops the tests on console from running and looks like it crashes cypress. The error is the following:
It's not possible that the resource is missing or somewhere else because most of the times the test works. Most of the time its a different test where the error comes up. The worst part is that I have no idea how to reproduce that error. And it looks like that problem is only appearing for me.
So please tell me if you have ever seen this message and maybe you can help me fix this problem. Thank you for your help.
This is caused by a bug in Cypress which causes usages of window.location.href and other Location methods to incorrectly use /__/ as the base URL.
You can try enabling the experimentalSourceRewriting config option to work around this, read here for more info: https://docs.cypress.io/guides/references/experiments.html#Configuration

Occasionally getting Reference Error in Javascript console

I am occasionally getting different types of Reference errors logged in chrome console.
For eg: require not defined
Cookies not defined
lozad not defined
The code is bundled in static-internal-bundle.js which is a combination of 7 different util files and minified using gulp-minify.
This error is coming mainly when the url is hit from paid.braintree.com Ad urls and has utm_source, utm_medium and utm_campaign as query parameters.
This error is not consistent and mostly does not reoccur if the site is refreshed.
Also, it has been logged in sentry for all types of devices and Os for over 1.5k times in 6 months. Though it gets logged in console, nothing seems to break on the webpage.
What could be the possible reasons for this type of error?
<script type="text/javascript" src="https://static.pens.com/576801d7b3a368c06ba1944c07fe260b970da596/build/static-internal-bundle.js"></script>
This is the script that gets added into the page in which the error is coming.
I would add this as a comment but StackO won't let me without 50+ rep... I'll edit as needed.
Possibly the error could be in using "require" on the browser side, as browsers do not implement require
This sounds like a problem I have had with Babel, if it is being used I would try updating.

e.process is undefined in VueJs application

So, on my windows machine I defined an environment variable like
SET VUE_MAP_PORTAL_TITLE=Map
And in my Vue application I try to use it in this way:
<v-input hide-details clearable>{{process.env.VUE_MAP_PORTAL_TITLE}}</v-input>
However, when I run my application, I get this error message in the console:
TypeError: "e.process is undefined"
And in debug tools, I see that in fact this construct is undefined: _vm.process
So, what is wrong with that ans how can I fix it. By the way, in .env file this variable is also defined.

Sencha build error when viewed in browser

I have finally managed to create a production build of my sencha web app using Cmd 3.10.2.342 and touch 2.2.1
All my bespoke files are included and deltas are created as one would expect. However, when I run it in the browser, it stalls at the loading view. Console log says:
TypeError: 'undefined' is not a function (evaluating 'h.call(w,w)')
I have traced the error to Ext.application({... in app.js.
I have tried the following changes, but still get errors:
new Ext.application({...
Ext.Application({...
new Ext.Application({...
How can I rectify this?
When I generate an apk file, I do not have this problem
In my production app.js, I found this
if(!s){a.set(i,w);if(h){h.call(w,w)}a.triggerCreated(i);return}
I don't really know what it does. I have tried deleting it etc, but it just the gives other errors instead
I traced this back to issues/conflicts with itemId and id where sencha was telling me that a component already existed and should be destroyed.
Solved it by removing id and itemId and used cls instead

Categories

Resources