There's some kind of bug with recent versions of npm, which requires you to specify a version when installing weinre. Try this instead:
npm
npm -g install weinre@latest