I actually did not like the movie for James and the Giant Peach. The book, of course, is better. The Johnny Depp Charlie and the Chocolate Factory is closer to the original book as far as the factory tour. But, it took a lot of liberties, also. This is why I would be nasty if my book ever became a movie. I hate it when directors muck up a good story with their “vision” of how things should be.
So do I, sometimes, but movies are a different medium from books or stage productions, and sometimes things that work in one format just plain don't work in another. A prime example of that occurs in Little Shop of Horrors. In the stage show, Audrey and Semour get eaten by the plant, but then--despite having been eaten, they are still "all right" at the curtain call. Movies don't have curtain calls like stage productions do. The ending which was humorous on stage turned out devastating on film. Frank Oz, the director, had insisted, against the producer's advice, on keeping the original ending. After having seen how test audiences reacted, he realized the original ending just didn't work in the movie, and had to remount to create a happy ending.