Why am I getting Unexpected token '\u0000' when using npm install -g package Why am I getting Unexpected token '\u0000' when using npm install -g package windows windows

Why am I getting Unexpected token '\u0000' when using npm install -g package


Via this question on SO it could be that you just have to do:

npm cache clean.

But, also try the other methods suggested there like adding the registry option:

npm install <packagename> --registry http://registry.npmjs.org/.

Or, if you've been mingling with the package.json file by yourself, check if it's valid.