“What could possibly go wrong?” asks the newly named Captain Hook of his pal Peter Pan as they sail the Jolly Roger through the sky at the end of “Pan” — en route to another prequel that will almost certainly never happen. This joyless, 10-megaton bomb fails in just about every imaginable way, as well as some you couldn’t possibly imagine.

It’s got a script that jams in random elements from other blockbuster franchises; massive sets and ugly costumes that look like they were recycled from 25 different movies; a uniformly charmless cast headed by Hugh Jackman, each of whom seems to be performing in a different film — all directed by Joe Wright, an expert at literary adaptations who turns out to be utterly tone-deaf when it comes to fantasy.

This utterly unnecessary origin story moves J.M. Barrie’s young Victorian hero to World War II London, for no apparent reason except that somebody thought it was a good idea to have RAF fighter planes shooting at an airborne pirate ship while we watch in very dimly lit 3-D.

Abducted from an orphanage with the cooperation of evil nuns who run the place, Peter (Australian newcomer Levi Miller in “Oliver!” mode) is taken to Neverland, where he’s put to work by the flamboyantly immortal Blackbeard (Jackman), digging for pixie dust in what looks suspiciously like a mine from “Mad Max: Fury Road.”

When Peter accidentally discovers he can fly, Blackbeard informs the lad he’s the “chosen one,” just like Frodo, Harry Potter and the heroes of lesser young adult franchises that Barrie would probably have turned up his nose at.

Peter escapes with the help of a two-handed Indiana Jones clone named James Hook (Garrett Hedlund), and heads to a reservation where Princess Tiger Lily (Rooney Mara, “Avatar”-ing it up in Native American drag and kabuki makeup) presides over what looks mighty like a United Colors of Benetton Village with a giant trampoline at its center.

After brief and unexciting encounters with a trio of mermaids (all played by Cara Delevingne) and CGI alligators, Peter and company head to the icy Fortress of Solitude, er, Fairy HQ, for a schmaltzy tête-à-tête with the spirit of the lad’s birth mother (Amanda Seyfried).

Jackman tries desperately to smirk and camp his way through “Pan,” at one point even breaking into a few bars of Nirvana’s “Smells Like Teen Spirit.’’ Something definitely smells here, and not like teen spirit.