I’m in Meteor 2.7. .meteor/packages
shows the session
package. Regardless if I import {Session} from 'meteor/session'
, I simply get an error that Session
is undefined
.
This happens only in the server. Client can access Session
just fine.
This is my entire server code:
console.log('Session', Session)
which results in this error:
W20220409-17:23:48.517(-7)? (STDERR) ReferenceError: Session is not defined
W20220409-17:23:48.517(-7)? (STDERR) at module (server/entry.ts:1:24)
W20220409-17:23:48.517(-7)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20220409-17:23:48.517(-7)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20220409-17:23:48.518(-7)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20220409-17:23:48.518(-7)? (STDERR) at /home/trusktr/src/lume+lume/apps/first-person-shooter/.meteor/local/build/programs/server/app/app.js:21:1
W20220409-17:23:48.518(-7)? (STDERR) at /home/trusktr/src/lume+lume/apps/first-person-shooter/.meteor/local/build/programs/server/boot.js:401:38
W20220409-17:23:48.518(-7)? (STDERR) at Array.forEach (<anonymous>)
W20220409-17:23:48.518(-7)? (STDERR) at /home/trusktr/src/lume+lume/apps/first-person-shooter/.meteor/local/build/programs/server/boot.js:226:21
W20220409-17:23:48.518(-7)? (STDERR) at /home/trusktr/src/lume+lume/apps/first-person-shooter/.meteor/local/build/programs/server/boot.js:464:7
W20220409-17:23:48.518(-7)? (STDERR) at Function.run (/home/trusktr/src/lume+lume/apps/first-person-shooter/.meteor/local/build/programs/server/pro
This is my .meteor/packages
file:
meteor-base@1.5.1 # Packages every Meteor app needs to have
mobile-experience@1.1.0 # Packages for a great mobile UX
mongo@1.14.6 # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
session@1.2.0 # Client-side reactive dictionary for your app
jquery@1.11.10 # Helpful client-side library
tracker@1.2.0 # Meteor's client-side reactive programming library
standard-minifiers@1.1.0 # JS/CSS minifiers run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers.
ecmascript@0.16.2 # Enable ECMAScript2015+ syntax in app code
autopublish@1.0.7 # Publish all data to the clients (for prototyping)
insecure@1.0.7 # Allow all DB writes from clients (for prototyping)
shell-server@0.5.0
dynamic-import@0.7.2
underscore@1.0.10
autoupdate@1.8.0
typescript
Any ideas why on earth it is undefined
?