Tools: Unable to get polymer-cli setup on mac

Created on 27 May 2016  路  6Comments  路  Source: Polymer/tools

Get following errorr

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "polymer-cli"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! file /Users/Vikmac/.npm/minimist/1.2.0/package/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /Users/Vikmac/.npm/minimist/1.2.0/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Vikmac/Documents/workspace/shop-app/shop/npm-debug.log

cli Medium Available Bug

Most helpful comment

Uninstall and reinstall of node and npm doesnt fix it. I think cached packages from previous bower install were messed up.

Executed --- npm cache clean
~/.npm is a cache that npm uses to avoid re-downloading the same package multiple times. That was having 0 byte package.json for different packages like minimist, object-assign and others

it got me further but Still was not able to run polymer then upgraded npm to 3.9.3 using
[sudo] npm install npm@latest -g

And finally have it working.

All 6 comments

Interesting that the installation failed inside minimist. Maybe a network error? Can you try again?

What version of node and npm are you running?

Tried multiple times same issue. Node - v4.4.5, npm - 2.15.5

I cannot reproduce on my mac, with your versions of node & npm.

@vikjung Can you try running npm install -g polymer-cli --verbose and pasting the full output here?

Attached detail

polymer-cli issue.txt

It looks like you have a bad package.json in your collection of global npm dependencies (~/.npm). You can run cat /Users/Vikmac/.npm/minimist/1.2.0/package/package.json on your machine to confirm that that file is empty (it most certainly shouldn't be).

Since this isn't a polymer-cli problem and is a problem with your environment (or possibly npm) I'm closing this issue. I'd recommend uninstalling/reinstalling that global package via npm and seeing if that fixes it.

Good luck!

Uninstall and reinstall of node and npm doesnt fix it. I think cached packages from previous bower install were messed up.

Executed --- npm cache clean
~/.npm is a cache that npm uses to avoid re-downloading the same package multiple times. That was having 0 byte package.json for different packages like minimist, object-assign and others

it got me further but Still was not able to run polymer then upgraded npm to 3.9.3 using
[sudo] npm install npm@latest -g

And finally have it working.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NeoLegends picture NeoLegends  路  3Comments

priyabrat1801 picture priyabrat1801  路  3Comments

rasto68 picture rasto68  路  4Comments

web-padawan picture web-padawan  路  4Comments

MaKleSoft picture MaKleSoft  路  3Comments