Closed GiorgosK closed 3 months ago
After a lot of soul searching ended up building the actual installed package
$ cd node_modules/@solana-developers/helpers
$ npm run build
> @solana-developers/helpers@2.2.0 build
> tsup src/index.ts --dts
sh: 1: tsup: not found
$ npm i tsup -D
...
$ npm run build
> @solana-developers/helpers@2.2.0 build
> tsup src/index.ts --dts
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v7.2.0
CLI Target: es2022
CJS Build start
CJS dist/index.js 10.25 KB
CJS ⚡️ Build success in 21ms
DTS Build start
DTS ⚡️ Build success in 1069ms
DTS dist/index.d.ts 1.86 KB
After that the initial error was gone
In my case, the lib was fetched from Github, not NPM Probably something went wrong when publishing v2.2.0. So you can skip that issue by specifying a certain version.
npm i @solana-developers/helpers@latest
npm i @solana-developers/helpers@2.2.0
hrm I can't replicate here.
mkdir deleteme
cd deleteme
npm init -y
npm i @solana-developers/helpers
edit runme.ts
npx esrun runme.ts
runme.ts
is:
import {
getKeypairFromEnvironment,
airdropIfRequired,
} from "@solana-developers/helpers";
console.log(getKeypairFromEnvironment);
The file runs and the function is found and logged.
@GiorgosK what happens when you do this?
@lucky-gru when you say "In my case, the lib was fetched from Github, not NPM" did you run npm i @solana-developers/helpers
or install via some other way?
@mikemaccana I tried
npm i @solana-developers/helpers
Do you still get this with 2.3.0?
Please follow these instructions and report results (same as previous)
mkdir deleteme
cd deleteme
npm init -y
npm i @solana-developers/helpers
edit runme.ts
npx esrun runme.ts
runme.ts is:
import {
getKeypairFromEnvironment,
airdropIfRequired,
} from "@solana-developers/helpers";
console.log(getKeypairFromEnvironment);
Haven't gotten any reply to this, it seems like it's dead. Closing...
As part of this tutorial https://www.soldev.app/course/intro-to-writing-data there is this line
after adding/install with
npm i @solana-developers/helpers
I still get the following error reported by vscodeand when running the ts file
Even though I can see the package in "node_modules/@solana-developers/helpers"