Questions tagged [nextjs]
The nextjs tag has no usage guidance.
33 questions
0
votes
0
answers
25
views
Jupiter Terminal input mint configuration
I'm integrating Jupiter terminal in my next.js project and I want to know how to fix my input mints to SOL and USDT only.
const mod = await import('@jup-ag/terminal')
const init = mod.init
...
0
votes
1
answer
118
views
TypeError: Cannot read properties of undefined (reading 'size')
I want to use idl for the backend, but when initializing it there are some errors, I really tried many ways but can't fix it, thank you everyone for your help.
code
import { Sleep } from "./Sleep&...
0
votes
1
answer
28
views
anchor build not working for my project [duplicate]
error: not a directory: '/Users/macbook/.local/share/solana/install/releases/1.18.18/solana-release/bin/sdk/sbf/dependencies/platform-tools/rust/bin'
The error above is what i get when i run anchor ...
0
votes
0
answers
67
views
Instruction references an unknown account FeBFCyJ26WxmN61bnXB2CyxFaUV2PzGwvqerCJcT5sC4
I have a Rust Anchor program for swapping SPL Tokens. It has three methods: Make, refund and take. Also I have a Next.js frontend app. I want to integrate this Rust Anchor program with Next.js app. ...
1
vote
1
answer
45
views
Error miniting token for user in next js typescript
I'm trying to mint my tokens for initial users
this is my frontend code I'm calling the mintTokensForUser function but the error I'm getting is
icoPage.tsx:44 Error minting tokens:
RangeError: ...
2
votes
2
answers
371
views
src.toArrayLike is not a function
I am trying to do a dapp on Solona with Next.js and Ancor.
I am getting that error
Here is my program setup
const connection = new Connection(clusterApiUrl("devnet"), "confirmed");...
1
vote
1
answer
161
views
Allow a holder to freeze/thaw their own SPL token token account
I am looking at developing a dapp that rewards holders based on the length they keep their associated token account frozen for.
I have tried the below code in my nextjs/react app, however I can only ...
0
votes
0
answers
109
views
How to Configure Solana Wallet Adapter with Next.js Middleware for Subdomain Redirects?
I'm building a decentralized application (dApp) using Next.js and Solana, and I need some help with integrating the Solana Wallet Adapter in a way that works with subdomain redirects handled by Next....
0
votes
0
answers
66
views
Phantom wallet working fine in localhost but not on vercel server
I connected the phantom wallet to my next js program it's working fine in local but after production to vercel it's static doesn't do anything.
1
vote
0
answers
151
views
How to force wallet adapter to connect to specific wallet
We are building an app that utilizes the Anza Wallet Adapter. For our specific use case, we get the user to choose a specific wallet address that will be linked to their account. The intended ...
1
vote
1
answer
38
views
Fresh development environment fails to install required packages (NextJS/Typescript Env)
Im setting up a standard env for Solana using NextJS/Typescript. When I try to add standard packages via Yarn:
yarn add @solana/wallet-adapter-react @solana/wallet-adapter-wallets @solana/web3.js @...
0
votes
1
answer
131
views
Solana Web3 Instructions Suddenly Not Working (Next.JS)
I've got a Next.js application making a few transactions calls using '@solana/wallet-adapter-react' and @solana/spl-token
The application has been working fine locally until with the transactions ...
1
vote
0
answers
38
views
Sending transaction working locally but not on production
transaction.add(
SystemProgram.transfer({
fromPubkey: publicKey,
toPubkey: new PublicKey(
"wallet here"
),
lamports: 0.0069 * 10 ** 9,
})
);
const {
...
0
votes
1
answer
22
views
I am prevented from creating a next app by my PC
Gm frens, I tried creating a next js project and I kept getting this error " Error: EPERM: operation not permitted, mkdir 'C:\Windows\solana-pay-store'", something about me not having ...
1
vote
1
answer
524
views
Errors when using `@project-serum/anchor` with Next.js v14 using Webpack 5
I am sharing my useWalletHook.tsx file:
"use client";
import { Program, AnchorProvider } from "@project-serum/anchor";
import {
useConnection,
useWallet as useAdapterWallet,
...
0
votes
1
answer
107
views
TypeError: off is not a from solanaWalletAdapter [closed]
I am getting this error in next.js
thats my index.tsx
import React, { FC, useMemo } from 'react';
import { ConnectionProvider, WalletProvider } from '@solana/wallet-adapter-react';
import { ...
2
votes
1
answer
886
views
Cannot use solana TS packages on CommonJS module
I've been trying to use Solana wallet adapters on my NextJS-TypeScript-based project with no luck. I can run it on the development, but I cannot build it for production. This is what I got when I run ...
0
votes
2
answers
322
views
Display Updated Wallet Balance After Transaction Confirmed
i'm learning solana development from Buildspace and this is the tutorial source code for the next.js app
https://github.com/buildspace/solana-send-sol-frontend.git
the component to display the solana ...
2
votes
1
answer
222
views
umi functions causing Application error: a client-side exception has occurred
My website works fine locally but when deployed to Vercel, I get a client-side exception error. After checking other parts of the website, I've found the culprit to be in my UMI function code. I'm ...
2
votes
2
answers
80
views
How to update items available count on candy machine UI after someone mints? Next app using umi
I built a ui on next js using typescript and need the items available count to not only show currently available items but to update after a user mints. Currently, I'm using candyMachine.data....
2
votes
3
answers
413
views
Add spl-token balance to wallet balance context provider
I'm trying to add a balance of USDC in a connected wallet that updates on a nextjs typescript website. I want to add it to my SOL balance context provider or do I need to make a completely separate ...
1
vote
0
answers
176
views
Serverbased auth solution for solana wallet [closed]
I created my first opensource project: serverbased login + auth through solana message signing with the T3 stack (nextjs, next-auth, trpc & prisma)
https://github.com/mattiprive/solana-login-t3-...
1
vote
1
answer
664
views
Issue with Next.js 13 and Solana Wallet Adapter packages
I am trying to implement the Solana wallet adapter to a nextjs 13 project using layout.tsx file. The Solana Wallet adapter was working with no problem on previous next.js versions. I tried to ...
2
votes
2
answers
271
views
How to dynamically import clusterApiUrl in next js
I want to dynamically import clusterApiUrl from "@solana/web3.js" using next/dynamic, but I get an error "clusterApiUrl is not a function".
This is how I import it:
const ...
0
votes
1
answer
139
views
Transaction working locally and with ngrok (https), but not working when deploying to aws amplify
const lamports = 0.001 * 10 ** 9;
const fromPubKey = new PublicKey(
'Wallet sending here'
);
const toPubKey = new PublicKey(
'Wallet receiving here'
);
const transaction = new ...
1
vote
0
answers
32
views
Next.js unresponsive after deployment to Azure/Vercel
After deploying next.js app to Azure/Vercel the site becomes unresponsive. I tried the site on a browser without wallet and the site works fine. After installing phantom to the browser the site works ...
3
votes
1
answer
262
views
Phantom: WalletSendTransactionError: Something went wrong nextjs
Code works in dev version
In production:
Error description: Phantom - RPC Error: Something went wrong. {code: -32603, message: 'Something went wrong.'}
In server side:
const { blockhash } = await (...
1
vote
0
answers
93
views
Sending SPL Token Exception
I am attempting to transfer tokens when a user clicks a button. Once a user connects their wallet I have this method that gets called when a user clicks a button
async function claimTokens() {
...
0
votes
1
answer
60
views
Conditional rendering with Solana Wallet Adapter & NextJS
I was wondering whether this was a safe way to render certain elements only for specific pubkeys when connected through Solana wallet adapter in Nextjs.
This code returns an < AdminPanel /> when ...
1
vote
1
answer
339
views
Detect account switching in Phantom Wallet?
What is the best way to detect account switching in Phantom Wallet?
I am using Nextjs.
5
votes
2
answers
1k
views
sendAndConfirmTransaction returns Cannot read properties of undefined (reading 'toString')
I cannot send the transaction here. Tried using wallet-adapter methods as well as solana/web3js methods, tried separating sendTransaction and confirmTransaction.
Similar "cannot read .toString() ...
0
votes
1
answer
544
views
How do I use WalletPovider for a function outside of return()?
I have been attempting to use the Solana Labs wallet adapter to create a NFT Staking site. The backend script is on the chain using Gemworks Gem Lab. Currently my front end has functions created by ...
5
votes
1
answer
671
views
What method should a dApp use to detect a change in Wallet Network for any wallet supported in the Solana Wallet Adapter?
When building a Solana dApp, developers need to understand changes in both the active wallet for the current user and in changes to the selected network for that wallet. Changes to the active wallet ...