Skip to content

Error with 'setDefault' in app.vue #9

@AsafAgranat

Description

@AsafAgranat

I cloned the example and followed all the add, remove and npm instructions mentioned in the Readme.md. On first run it throws the following error:

 Exited with code: 1
.....meteor\packages\meteor-tool\1.4.3_2\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:280
throw(ex);
TypeError: Cannot read property 'setDefault' of undefined
 at imports/ui/App.vue:27:1

Not sure what's causing it. Perhaps something changed in the recent Session package?
I changed the faulting line from to: Session.setDefault("counter", 0) to: Session.set("counter", 0) which made the app run fine.

UPDATE
I changed it back to the orginal Session.setDefault("counter", 0), but I moved it into the 'beforeCreate' lifecycle hook, and that seems to work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions