Repository navigation
fix(overview): update deprecated commands and wrong packages - #2342
Conversation
- Replace `npm create svelte@latest` with `npx sv create` (create-svelte is deprecated) - Pin tailwindcss to v3 to prevent breakage with v4 (init -p was removed in v4) - Replace deprecated `stellar-sdk` with `@stellar/stellar-sdk` - Replace `@stellar/wallet-sdk` with `@stellar/typescript-wallet-sdk-km` (wrong package, different API) - Update vite.config.js noExternal to reflect packages from basicpay a25cc81 (Oct 2024) - Replace dead `js-stellar-wallets` reference (archived repo, not on npm) with `@stellar/typescript-wallet-sdk-km`
There was a problem hiding this comment.
Pull request overview
Updates the “Example application tutorial” overview page to reflect newer/renamed Stellar and SvelteKit ecosystem tooling, aiming to prevent breakages caused by deprecated CLIs and package changes.
Changes:
- Replaces deprecated SvelteKit scaffolding command with
npx sv create. - Pins Tailwind CSS to v3 and updates Stellar SDK install instructions to
@stellar/stellar-sdkplus@stellar/typescript-wallet-sdk-km. - Updates Vite SSR
noExternallist and replaces the deadjs-stellar-walletsreference/link.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash npm2yarn | ||
| # Stellar SDKs | ||
| npm install --save-dev stellar-sdk @stellar/wallet-sdk | ||
| npm install --save-dev @stellar/stellar-sdk @stellar/typescript-wallet-sdk-km |
There was a problem hiding this comment.
The dependency install instructions here were updated to @stellar/stellar-sdk and @stellar/typescript-wallet-sdk-km, but other pages in this same tutorial still show imports/usage for the old packages (stellar-sdk, @stellar/wallet-sdk) and even refer to the archived js-stellar-wallets SDK. Following the tutorial from this point will likely break later copy/paste snippets unless those pages are updated to the new packages (or this install command is reverted/adjusted to match the rest of the tutorial).
There was a problem hiding this comment.
The updated install command is correct, the other tutorial pages (Account Creation, Querying Data, SEP-1, SEP-10) still reference the old packages and will be fixed in follow-up PRs.
| # Stellar SDKs | ||
| npm install --save-dev stellar-sdk @stellar/wallet-sdk | ||
| npm install --save-dev @stellar/stellar-sdk @stellar/typescript-wallet-sdk-km | ||
| # We will need some polyfills to make things available client-side | ||
| npm install --save-dev @esbuild-plugins/node-globals-polyfill @esbuild-plugins/node-modules-polyfill \ | ||
| path @rollup/plugin-inject buffer svelte-local-storage-store uuid |
There was a problem hiding this comment.
These SDKs are used by the running application code, not just during build time. Installing them with --save-dev means a production install that omits devDependencies (common in CI/CD) will fail at runtime/build; prefer installing runtime libraries under dependencies (e.g., use npm install ... without --save-dev) and reserve --save-dev for tooling-only packages.
There was a problem hiding this comment.
The BasicPay app is a client-side static app with no server runtime. Everything is bundled by Vite at build time. There is no production npm install --omit=dev step that would leave these packages missing. The actual basicpay repo reflects this: both @stellar/stellar-sdk and @stellar/typescript-wallet-sdk-km are listed under devDependencies in its package.json. The --save-dev flag is intentional here.
2 similar comments
|
Closing in favor of a new PR from the correct branch (stellar/stellar-docs instead of the fork). |
npm create svelte@latestwithnpx sv create(create-svelte is deprecated)stellar-sdkwith@stellar/stellar-sdk@stellar/wallet-sdkwith@stellar/typescript-wallet-sdk-km(wrong package, different API)js-stellar-walletsreference (archived repo, not on npm) with@stellar/typescript-wallet-sdk-km