Corrections & clarifications: An earlier version of this story misstated the percentage decline in Tesla’s stock price from its September peak.

Tesla, the upstart that has defied the unwritten rules of the auto industry, is finishing up a year in which the challenges of manufacturing a mass-market electric car in large quantities finally hit home.

After years of bragging about its advanced manufacturing techniques, the Silicon Valley automaker faces a reality check when it comes to making its first mainstream car, the Model 3 electric sedan.

With output failing by a wide margin to meet Musk's promise of 5,000 vehicles per week by the end of December, Tesla could be facing a make-or-break 2018. The new year may determine whether the company will need to again go hunting for cash and whether it maintains its leadership position in electric vehicles.

Speeding the rollout of the Model 3, which at about $35,000 will be roughly half the starting price of Tesla's luxury models, is essential to company's financial health. Reason: Tesla lost several million dollars per day in the third quarter in its rush to begin manufacturing.

"Is this the year investors will say, 'Enough’s enough,' or will they continue to fund Tesla?" Autotrader.com analyst Michelle Krebs said. "That’s the big question. I suspect investors would continue funding them if they see progress on the Model 3."

So far, investor enthusiasm remains high. Tesla briefly passed General Motors as the most valuable automaker in the U.S., as measured by stock price and shares outstanding, in April. Tesla shares sailed to an interday high of $389.61 in September but have since settled back 20% to about $312 on Wednesday.

At present, Tesla is valued at about $53.3 billion, less than GM, at $59.4 billion.

Now Tesla's main focus is on the Model 3, which will require successfully exiting what CEO Elon Musk has called "production hell." The problems are in stark contrast to the successes that the company has scored in producing two luxury electric-vehicle models, defying the conventional auto industry in the process, and selling cars direct to the public rather than through dealers.

Tesla, which declined an interview request, has denied reports that workers at the automaker's Fremont, Calif. factory were assembling some parts by hand at one point. But Tesla did acknowledge it hit significant "bottlenecks" in production and Musk said that at one point he was "really depressed" about it.

More:Tesla fires hundreds as Model 3 electric car production drags

More:Tesla production snags delay Model 3 electric car

More:Worried about your Tesla Model 3 order? Don't panic — yet

More:Review: First drive of Tesla's electric Model 3

More:Elon Musk promises to make a Tesla pickup truck, said he is 'dying to build' one

Morgan Stanley auto analyst Adam Jonas estimated in a report Dec. 15 that Tesla would make 8,000 Model 3 vehicles in the entire first quarter, falling tens of thousands short of the company's initial hope. He also estimated that Tesla will burn through another $1.1 billion in free cash flow next year, but that it has "substantial flexibility" when it comes to liquidity and avoiding a cash crunch.

Musk has blamed the company's underwhelming Model 3 production partially on an unidentified supplier that failed to live up to expectations, causing insufficient production of the critical lithium batteries made at Tesla's Reno, Nev. factory.

"It's our fault for picking the wrong supplier and then not realizing it until way later in the game," Musk told investors in November.

He also acknowledged that the company had struggled to perfect the newly automated and supposedly extremely advanced processes it designed to make the Model 3.

"There's vastly more automation with Model 3," he said. "Either the machine works or it doesn't [and] it's lumping along and we get short quite severely on output."

Separately responding to a Twitter follower on Tuesday, Musk tweeted he's "dying to build" an electric pickup truck. Musk suggested he would tackle that job after the Model Y, a Tesla crossover SUV that he has hinted about via both Twitter and on a Tesla conference call earlier this year.

For Tesla to get things right in 2018, it will have to avoid production miscues and pick the right suppliers. That's how the world's biggest automakers do business.

The company's future is riding on it. Here are the keys to Tesla staying on track in 2018:

Model 3 production must be fixed — and fast.

The longer the sluggish output continues, the more likely the company will lose customers who have placed refundable $1,000 deposits to reserve their place in line. Although Tesla fans are loyal, loyalty has limits.

Another factor: Tesla desperately needs to begin offsetting the red ink from its costly production expansion with sales revenue. Without it, the automaker could run out of cash very quickly, potentially forcing it to issue more debt or sell more stock to raise capital.

"2018 should be a year of reckoning for Tesla," AutoPacific analyst Dave Sullivan said in an email. "This will be the year that Model 3 has to hit production targets. If anyone expects their cash burn to suddenly stop, I believe they will be very disappointed."

Elon Musk can't spread himself too thin.

The visionary innovator leads Tesla, which has been merged with rooftop solar energy company Solar City, and rocket maker and launch company SpaceX. He's also building a tunnel-making outfit called the Boring Company, developing a brain stimulation start-up called Neuralink and funding a nonprofit designed to educate people about the benefits and dangers of artificial intelligence.

Inside of Tesla, he's developing a wide range of products, as well, including the company's new semi-truck, solar roof tiles, autonomous vehicle technology and a new Roadster supercar.

It's all potentially worthwhile and promising. But is it too much? And does he risk becoming distracted from the basic execution of manufacturing new cars?

"He’s got these big visions and on multiple fronts," Krebs said. "He is spinning a lot of plates that are all tied into his vision of the future. But at the end of the day you have to get down to the nitty-gritty of making things."

Labor strife must be avoided.

After Tesla fired hundreds of employees at once in the fall, questions arose about the company's relationship with its workforce.

The Detroit-based United Auto Workers, which is aiming to unionize Tesla's Fremont plant, accused the automaker of firing employees who were rallying workers to the union's side. The UAW filed unfair labor practice charges against Tesla with the National Labor Relations Board.

UAW President Dennis Williams told reporters on Dec. 20 that Tesla employees "are very concerned about health and safety in that plant and other issues."

Musk has blasted the suggestion that the firings were inappropriate, saying the company has "an extremely high standard" and that workers were let go after customary annual performance reviews.

Tesla's standards are "not high because we believe in being mean to people," he said. "They're high because if they're not high, we will die."

Keeping allies happy

Although Tesla did not publicly identify the supplier it blamed for production bottlenecks, it's not the first time the company has had a falling out with a key partner.

For Tesla to meet its goals, the company must maintain strong relationships with its allies. But there are signs some of its friends are keeping their options open.

For example, Tesla is engaged in a battery partnership with Panasonic at its Reno facility. That alliance is critical to the company's performance and it can't afford any problems there.

But Panasonic turned heads in December by striking a battery partnership with Japanese automaker Toyota.

While Panasonic said the deal did not affect its collaboration with Tesla, the move put Tesla on notice: Suppliers have other ways to make money.

Follow USA TODAY reporter Nathan Bomey on Twitter @NathanBomey.