N64 was big everywhere and so was the NES and SNES and Gameboy....
N64 here got snowballed by the PS1 (and internationally).
Nintendo handhelds have been here since the Gameboy but they have not exactly been massive. NES got beaten by the Mastersystem, SNES was hard to get, N64 was niche, Gamecube was rare, Wii was a fad and was not that big anyway, WiiU flopped hard.
Nintendo sales usually come from the USA and Japan, similar story to Playstation these days (PS3 was outsold by 360, outside Japan the ratio was lopsied in 360's favor).
Nintendos problems go back to the N64 going cartridge based and outside of the Nintendo exclusives (Mario, Zelda, Metroid) they have a weak lineup.