Jules
Jules

Reputation: 153

Code crashed after upgraded from Meteor Windows 0.5.4 to Meteor 0.6.4.1

I just upgraded my Windows Meteor from 0.5.4 to 0.6.4.1. I am on Windows 7. After upgrade my working code crashed with the following error messages:

Errors prevented startup:
Exception while bundling application:
TypeError: Cannot read property 'raw' of undefined
at C:\Program Files (x86)\Meteor\packages\meteor\package.js:15:15
at _.extend.add_file (C:\Program Files (x86)\Meteor\app\lib\bundler.js:201:5)
at self.api.add_files (C:\Program Files (x86)\Meteor\app\lib\bundler.js:102:16)
at Array.forEach (native)
at Function..each..forEach (C:\Program Files (x86) \Meteor\lib\node_modules\underscore\underscore.js:78:11)
at self.api.add_files (C:\Program Files (x86)\Meteor\app\lib\bundler.js:101:11)
at Array.forEach (native)
at Function..each..forEach (C:\Program Files (x86) \Meteor\lib\node_modules\underscore\underscore.js:78:11)
at Object.self.api.add_files (C:\Program Files (x86)\Meteor\app\lib\bundler.js:100:9)
at null.on_use_handler (C:\Program Files (x86)\Meteor\packages\underscore\package.js:7:7)
Your application is crashing. Waiting for file change.

Upvotes: 0

Views: 203

Answers (2)

StephenD
StephenD

Reputation: 4122

As the two stack trace entries for bundler.js don't seem to tally with what I would expect for 0.6.4.1, there is a possibility that the MSI upgrade didn't work properly (MSI uses hashes to determine if text files are up-to-date).

I would suggest that you try:

  1. Uninstalling Meteor from Control Panel -> Add/Remove programs.
  2. Check that you have no files left in program files \Meteor.
  3. Re-install using the 0.6.4.1 installer.
  4. Check the installation works on the todos example (see below)
  5. Try your app.

To check that the install is working sensibly, create one of the example apps and check it runs:

meteor create --example todos
cd todos
meteor

Upvotes: 1

Tarang
Tarang

Reputation: 75955

Since 0.5.4 there have been a couple of changes. The big one being variable scoping.

If there is a variable in a file & you want to access that variable from another file you have to scope it globally.

i.e if you have

var x = true;

You have to change it to

x = true;

The same for a function:

function foo() { return "bar"; }
//or
var foo = function() { return "bar;"}

becomes

foo = function() { return "bar"; };

You have to go through your files an alter these.

Alternatively you could move your files to a new /compatibility directory where they wont be variable scoped.

Upvotes: 0

Related Questions