You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have secret key in .env in format:
SECRET_KEY="[(a series of numbers)]"
I installed npm i @solana-developers/helpers
And all other nesessary things
run npx esrun transfer.ts (public key)
got Error:
% npx esrun transfer.ts 4etzwnuNrSbzNeAn27ZoAaywgkEe8aVMxthb3pNWAsH7
/Users/…/node_modules/@solana-developers/helpers/dist/index.js:157
throw new Error(
^
Error: Invalid secret key in environment variable 'SECRET_KEY'!
at getKeypairFromEnvironment (/Users/…/node_modules/@solana-developers/helpers/dist/index.js:157:13)
at file:///Users/.../[eval1]:21:21
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.eval (node:internal/modules/esm/loader:204:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)
Node.js v20.16.0
BUT
In my earlier projects the same operations don’t cause error.
I found difference in file /Users/…/node_modules/@solana-developers/helpers/dist/index.js in current (version 2.4) and previous projects (version 2.2).
And If I change file index.js in current project with index.js from older project, everything works (no errors).
What’s wrong with my current index.js? What should I do to make it work without this exchanges?
Code and Screenshots
The text was updated successfully, but these errors were encountered:
nikaniknin
changed the title
Error: Invalid secret key in environment variable 'SECRET_KEY'!
[HELP]: Error: Invalid secret key in environment variable 'SECRET_KEY'!
Aug 20, 2024
Project: Introduction to cryptography and Solana clients
Lesson Number: https://solana.com/developers/courses/intro-to-solana/intro-to-cryptography, https://solana.com/developers/courses/intro-to-solana/intro-to-writing-data
Question
I learning solana with https://solana.com/developers/courses/intro-to-solana/intro-to-cryptography
I have secret key in .env in format:
SECRET_KEY="[(a series of numbers)]"
I installed
npm i @solana-developers/helpers
And all other nesessary things
run
npx esrun transfer.ts (public key)
got Error:
BUT
In my earlier projects the same operations don’t cause error.
I found difference in file /Users/…/node_modules/@solana-developers/helpers/dist/index.js in current (version 2.4) and previous projects (version 2.2).
And If I change file index.js in current project with index.js from older project, everything works (no errors).
What’s wrong with my current index.js? What should I do to make it work without this exchanges?
Code and Screenshots
The text was updated successfully, but these errors were encountered: