#error translation
16 messages · Page 1 of 1 (latest)
@spark ridge Showing the actual code causing the error and not just the error would be necessary for someone to help.
You can format code like:
```ts
// code here
Or better, reproduce the issue on https://www.typescriptlang.org/play
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
@solid cosmos update:
here's another error i got
**config.ts:1:10 - error TS2305: Module '"dotenv"' has no exported member 'dotenv'.
1 import { dotenv } from "dotenv";**
and here's the code
import { dotenv } from "dotenv";
dotenv.config();
const { DISCORD_TOKEN, DISCORD_CLIENT_ID } = process.env;
if (!DISCORD_TOKEN || !DISCORD_CLIENT_ID) {
throw new Error("Missing environment variables");
}
export const config = {
DISCORD_TOKEN,
DISCORD_CLIENT_ID,
};
@spark ridge
you used the wrong syntax
import * as dotenv from "dotenv";
not
import { dotenv } from "dotenv";
@strange bolt i changed it to that and got even more errors we are currently discussing this in #ts-discussion plz join in thank you
resolved, I guess? 🤔
eh
!resolved
@spark ridge
Because your issue seemed to be resolved, this post was marked as resolved by @strange bolt.
If your issue is not resolved, you can reopen this post by running !reopen.
If you have a different question, make a new post in #1057653400046674112.
okay