Skip to content

Commit

Permalink
Update intro-to-cryptography.md
Browse files Browse the repository at this point in the history
This error is shwoing when using 
```
import "dotenv/config"
```
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'D:\Coding\Solana\solKeyPair\node_modules\.bin\node_modules\dotenv\config.js' imported from D:\Coding\Solana\solKeyPair\node_modules\.bin\esrun-1723634828132.tmp.mjs
Did you mean to import ../../dotenv/config.js?

IF you use this then this error will be gonr
  • Loading branch information
SwarnenduG07 authored Aug 14, 2024
1 parent 9a05b8a commit e7b2ec0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/courses/intro-to-solana/intro-to-cryptography.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ SECRET_KEY="[(a series of numbers)]"
We can then load the keypair from the environment. Update `generate-keypair.ts`:

```typescript
import "dotenv/config";
import dotenv from "dotenv";
dotenv.config();
import { getKeypairFromEnvironment } from "@solana-developers/helpers";

const keypair = getKeypairFromEnvironment("SECRET_KEY");
Expand Down

0 comments on commit e7b2ec0

Please sign in to comment.