# Trouble Building a Transaction (PTB)

**URL:** <https://forums.sui.io/t/trouble-building-a-transaction-ptb/46106>\
**Category:** SDK\
**Tags:** sui\
**Created:** [September 30, 2024, 2:19am UTC](https://forums.sui.io/t/trouble-building-a-transaction-ptb/46106 "2024-09-30T02:19:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShooterMcGavin](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@ShooterMcGavin](https://forums.sui.io/u/ShooterMcGavin)\
**Post date:** [September 30, 2024, 2:19am UTC](https://forums.sui.io/t/trouble-building-a-transaction-ptb/46106/1 "2024-09-30T02:19:11Z")

</div>

I am working on a JavaScript project and I’m trying to build a PTB. After reading the sdk docs and multiple attempts at different build strategies, I keep running into the same error:

Transaction failed: Error: No provider passed to Transaction#build, but transaction data was not sufficient to build offline.

Has anyone run into this before? I would love some help here.

const bytes = await tx.build({ provider });  
const signature = await keypair.signTransaction(bytes);  
const result = await provider.executeTransactionBlock({  
transactionBlock: bytes,  
signature: signature,  
});
