[Solved] What happens with the 'session' package? - Error: unable to read the entire resource


#1

Hello everyone,

I created an application with
meteor create --minimal appTest

Then I try to add the session package
meteor add session (This works perfectly with my previous applications)

Now I have this error
Error: unable to read the entire resource

OK so I tried with ‘npm’
meteor npm install --save session
And in my code

Session import 'session';
Session.set ('sessName', 'sessVal')

And now I have the error
Session.set is not a function

What happens with the session package ???

Thanks for your help
YC


#2

Did you try:

import { Session } from 'meteor/session';

Session.set('sessName', 'sessVal'); 

#3

Thank you for your interest.

I actually tried this syntax and the error is
Error: Cannot find package "session". Try "meteor add session".

Of course, but it is precisely because this command does not work that I am there


#4

HELP !!!

The old applications does not work anymore !!!
When I run meteor, to be able to test on the local host I have the error

Error: couldn't read entire resource

HELP !!! HELP !!! HELP !!! HELP !!! HELP !!! HELP !!!


#5

I just tried installing fresh meteor copy and then I executed

meteor add session

And that worked fine. Which version of meteor you’ve? did you’ve any local packages installed? do you do any initialization code (on startup)?

Also you need to share the full stack trace of the error.


#6

Phew !!!
I reinstalled meteor and everything is back in order …
Thank you for your answers
YC