ethxn
12/12/2021, 10:45 PMErwin
12/12/2021, 10:50 PMethxn
12/12/2021, 10:51 PMErwin
12/12/2021, 11:03 PMCоlе
12/12/2021, 11:04 PMtypescript
// Connect to MongoDB realm
async function connect(env: any): Promise<globalThis.Realm.Services.MongoDB | Error> {
try {
console.log(env.REALM_APPID);
App = App || new Realm.App(env.REALM_APPID);
const credentials = Realm.Credentials.apiKey(env.env.REALM_AUTH_API_KEY);
const user = await App.logIn(credentials);
return user.mongoClient('mongodb-atlas');
} catch (err) {
console.log(err);
throw err as Error;
}
}
Here I'm just binding REALM_APPID from the command lineCоlе
12/12/2021, 11:04 PMCоlе
12/12/2021, 11:04 PMErwin
12/12/2021, 11:18 PMErwin
12/12/2021, 11:19 PMCоlе
12/13/2021, 1:15 AMTypeError: Cannot read properties of undefined (reading 'REALM_APPID').
Cоlе
12/13/2021, 1:15 AMCоlе
12/13/2021, 1:18 AMCоlе
12/13/2021, 1:25 AMenv
, destructured or not destructured, is undefined on staging 💀Erwin
12/13/2021, 1:33 AMCоlе
12/13/2021, 1:48 AMCоlе
12/13/2021, 1:48 AMCоlе
12/13/2021, 1:50 AMCоlе
12/13/2021, 1:51 AMCоlе
12/13/2021, 1:52 AMenv
and { env }
Erwin
12/13/2021, 1:53 AMonRequest*()
call?Cоlе
12/13/2021, 1:56 AMnaansequitur
12/13/2021, 3:53 AMwrangler.toml
? I'm able to see the ASSETS property but nothing elseErwin
12/13/2021, 3:55 AMpages dev
commandnaansequitur
12/13/2021, 4:01 AMErwin
12/13/2021, 4:01 AMbrainm
12/13/2021, 9:48 AMalbert
12/13/2021, 10:31 AMCache Everything
.Erwin
12/13/2021, 11:20 AMalbert
12/13/2021, 11:23 AMErwin
12/13/2021, 11:51 AM