I have a problem when using SuperTokens on express: ``` /Users/eugenechan/Desktop/one-click-dao-buil...
e
I have a problem when using SuperTokens on express:
Copy code
/Users/eugenechan/Desktop/one-click-dao-builder/backend/node_modules/supertokens-node/lib/build/supertokens.js:347
                      .split(";")
                       ^

TypeError: Cannot read properties of undefined (reading 'split')
has anyone faced this problem before?
r
Hey! What’s the supertokens.init that you have given?
e
Copy code
SuperTokens.init({
  framework: "express",
  supertokens: {
      // https://try.supertokens.com is for demo purposes. Replace this with the address of your core instance (sign up on supertokens.com), or self host a core.
      connectionURI: process.env.SUPERTOKEN_CONNECT_URI,
      apiKey: process.env.SUPETOKEN_CONNECT_KEY,
      // apiKey: "IF YOU HAVE AN API KEY FOR THE CORE, ADD IT HERE",
  },
  appInfo: {
      // learn more about this on https://supertokens.com/docs/session/appinfo
      appName: "One click DAO builder",
      apiDomain: "http://localhost:8000",
      websiteDomain: "http://localhost:3000",
      apiBasePath: "/auth",
      websiteBasePath: "/auth",
  },
  recipeList: [
      Session.init()
  ]
});
r
Is the value of process.env.CONNECTION_URI properly set? Can you console log it before calling the init function?
e
you are right; its undefined
ok perfect it works now!
thanks!!
r
Great!
3 Views