U.S. House Speaker Nancy Pelosi speaks about the need for additional coronavirus relief during her weekly news conference with Capitol Hill reporters in Washington, U.S., October 22, 2020.Hannah McKay | ReutersWhile Democrats and the White House are close to reaching a coronavirus stimulus deal, it could take a lot longer to write and vote on a bill, House Speaker Nancy Pelosi said Thursday.The California Democrat plans to speak to Treasury Secretary Steven Mnuchin again Thursday as they try to craft an aid agreement. While the speaker said the sides are “just about there” on reaching a deal, she cautioned that passing it into law will take time as she and the Trump administration try to resolve outstanding issues.”If we can resolve some of these things in the next few days, it’ll take a while to write the bill,” Pelosi told reporters at the Capitol.The House speaker said the sides still have not come to a consensus on several issues that have flummoxed negotiators during months of on-again, off-again talks. Those include aid to state and local governments, liability protections for businesses and funding for the U.S. Census and election systems.The failure to reach an accord by now has made it all but impossible for lawmakers to inject money into the fight against Covid-19 and boost a struggling economy before the Nov. 3 election. However, Pelosi said she believes “both sides want to reach an agreement” during what she called a “serious attempt” to provide aid.”We can do something great, and I’m still optimistic that we can do that,” she said. The effort to pass more stimulus is filled with pitfalls as Democrats and the White House discuss legislation that would cost roughly $2 trillion. Most Senate Republicans oppose another massive spending program, and it is unclear what kind of package could garner enough votes to get through the GOP-held chamber. Some Republican senators such as Marco Rubio of Florida have signaled they could support a bill with a staggering price tag as they worry that inaction would leave prolonged economic damage.This story is developing. Please check back for updates.Subscribe to CNBC on YouTube.