DiscoverMeteor/Microscope

Microscope project error message: your application is crushing

mahfuzkhalili opened this issue · 8 comments

I am following through the Discover Meteor microscope project, after page 44 get the following message in the browser:
"
C:\Users\Mahfuz\AppData\Local.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
ReferenceError: Router is not defined
at github_microscope/lib/router.js:1:1
at C:\microscope.meteor\local\build\programs\server\app\github_microscope\lib\router.js:106:4
at C:\microscope.meteor\local\build\programs\server\boot.js:242:10
at Array.forEach (native)
at Function..each..forEach (C:\Users\Mahfuz\AppData\Local.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
at C:\microscope.meteor\local\build\programs\server\boot.js:137:5
Exited with code: 8
Your application is crashing. Waiting for file change.
"

Sounds like you didn't add Iron Router?

In the Document page 73, it is showing to add iron router but I am still at
page 44

After adding iron router I am still getting the following error in line 3 "Error: A method named "/posts/insert' is already defined"

"
C:\Users\Mahfuz\AppData\Local.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: A method named '/posts/insert' is already defined
at livedata_server.js:1536:15
at Function..each..forEach (packages/underscore/underscore.js:113:1)
at [object Object]..extend.methods (livedata_server.js:1532:7)
at [object Object].Mongo.Collection.defineMutationMethods (packages/mongo/collection.js:923:1)
at new Mongo.Collection (packages/mongo/collection.js:214:1)
at lib/collections/posts.js:4:9
at C:\microscope.meteor\local\build\programs\server\app\lib\collections\posts.js:14:4
at C:\microscope.meteor\local\build\programs\server\boot.js:242:10
at Array.forEach (native)
at Function.
.each.
.forEach (C:\Users\Mahfuz\AppData\Local.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
Exited with code: 8
Your application is crashing. Waiting for file change.
"
On Thu, Oct 1, 2015 at 9:56 PM, Sacha Greif notifications@github.com
wrote:

Sounds like you didn't add Iron Router?


Reply to this email directly or view it on GitHub
#259 (comment)
.

If you're before Iron Router is added, then you should not have Router in your code?

It was referring to the router in the git-hub. I guess after creating github-microscope folder and running git command line utilities in the document it is referring to that folder.

After adding iron router the error is now different " C:\Users\Mahfuz\AppData\Local.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
throw(ex);
^
Error: A method named '/posts/insert' is already defined
at livedata_server.js:1536:15
at Function..each..forEach (packages/underscore/underscore.js:113:1)
at [object Object]..extend.methods (livedata_server.js:1532:7)
at [object Object].Mongo.Collection.defineMutationMethods (packages/mongo/collection.js:923:1)
at new Mongo.Collection (packages/mongo/collection.js:214:1)
at lib/collections/posts.js:4:9
at C:\microscope.meteor\local\build\programs\server\app\lib\collections\posts.js:14:4
at C:\microscope.meteor\local\build\programs\server\boot.js:242:10
at Array.forEach (native)
at Function.
.each.
.forEach (C:\Users\Mahfuz\AppData\Local.meteor\packages\meteor-tool\1.1.9\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
Exited with code: 8
Your application is crashing. Waiting for file change.

It sounds like there are other problems with your codebase. I would recommend either cloning the project again from GitHub, or else making sure you're following the book step by step.

I think somehow the steps related to github - document pages 38-40 has created problem in the app directory:
microscope

In that case I would suggest either getting more familiar with Git so you can fix the problem, or else just starting over with a fresh repo :)

I have checked again files in the documents and steps for cloning in the document page 38 there was no error during the cloning. There may be conflict in files in the original microscope folder and git_microscope folder.

microscope