Some problem for update one project from 1.2.1 to 1.3.4.4


#1

Hi guys,
I have a project based on Meteor 1.2.1 I try update it to 1.3.4.4 and until now I have two problem. I open this topic to ask my questions and share experience, maybe it’s useful for the others.

Question #1:

When I update my project with meteor update command I see this message on terminal:

Unable to resolve some modules:

  "jquery" in /home/user/Programming/IProjects/tttest/Sources/client/lib/select2/select2.full.js
(web.browser)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save jquery

but I haven’t any package.json for add jquery to it.
What is this message about?


Question #2:

I can run my project successfully in Meteor 1.2.1 but now after update My app crashed with iron-router message β€œOrganize your Meteor application” like below image:

Why this error happend? I used Iron-Router in all of my project parts. How to fix this?


#2

Look in your browser console. Are there any error messages?


#3

Hi man,
Yeh I see this error:
TypeError: e is undefined


#4

Well, you need to figure out where in your code it is throwing this error, because it clearly breaks your code before it can configure your routes


#5

@jamgold, Thanks for your attentions.
How to find this bug?
My app work correctly on 1.2.1 without any issue but now after update completely break :worried:


#6

Try to do this:

meteor update iron:middleware-stack

#7

@perak, Thanks for your attention man.
This is above command output: The specified packages are at their latest compatible versions.


#8

usually the console shows a file/linenumber where the error occurs. Anyways, without seeing your code nobody is really going to be able to help you


#9

@jamgold my code is running without any error on Meteor 1.2.1 and this error is not about my files. It’s file name:
localhost:3000/app/app.js


#10

so how is anybody supposed to help you? If you don’t show your code or at least copy paste the complete error message from your console, I am afraid all that is left for you is to revert back to 1.2.1.

I have upgraded many sites to the latest version of Iron Router and Meteor and did not have any problems.


#11

Hi @jamgold,

If you don’t show your code …

My project a little big but if you want to see any file (for example router.js or server startup or …) I can send it here. This is my application structure:

.
β”œβ”€β”€ both
β”‚   β”œβ”€β”€ collections
β”‚   └── lib
β”œβ”€β”€ client
β”‚   β”œβ”€β”€ client.js
β”‚   β”œβ”€β”€ lib
β”‚   β”œβ”€β”€ styles
β”‚   └── views
β”œβ”€β”€ lib
β”‚   β”œβ”€β”€ object_utils.js
β”‚   └── string_utils.js
β”œβ”€β”€ node_modules
β”‚   └── jquery
β”œβ”€β”€ package.json
β”œβ”€β”€ public
β”‚   β”œβ”€β”€ fonts
β”‚   └── icons
└── server
    β”œβ”€β”€ collections
    β”œβ”€β”€ controllers
    β”œβ”€β”€ methods
    β”œβ”€β”€ publish
    └── server.js

Also my route inside client/views/router.js

… copy paste the complete error message from your console

I post my error message and file in previous messages. I post it again here see below image:

And without any error on server console.
I can’t understand where is app.js file and how to debug this to find issue.

I have upgraded many sites to the latest version of Iron Router and Meteor and did not have any problems.

I also update near 4 app from 1.2.1 to 1.3.x based on Iron-Router without any issue but this app crashed without any reason.
I’m doing double check my codes and it seems all things is correct.

I search a lot and it seems I have same issue as this one but that solution (remove .meteor folder and recreate it) not working for me.


#12

@perak save me. @perak point to Chrome on this issue and this note save my life. I saw that project not working on Chrome too but I didn’t see console output on Chrome.
This is error message on Chrome:

I don’t know why but on Chrome more error printed on console and the main error is Uncaught TypeError: Cannot read property 'define' of undefined and this is a i18n files of select2 component that I used in project in client/lib/select2/i18n path. I remove this folder at all and now project works well without any issue.
Again thanks @perak :wink: