Polymer: problem with polymer-cli in ubuntu please give me solution

Created on 7 Sep 2017  路  4Comments  路  Source: Polymer/polymer

----------------- START -----------------
muhssin@Muhssin:~$ sudo npm install -g polymer-cli
npm WARN deprecated [email protected]: babili has been renamed to babel-minify. Please update to babel-preset-minify
npm WARN deprecated [email protected]: ..psst! While Bower is maintained, we recommend Yarn and Webpack for new front-end projects! Yarn's advantage is security and reliability, and Webpack's is support for both CommonJS and AMD projects. Currently there's no migration path, but please help to create it: https://github.com/bower/bower/issues/2467
npm WARN deprecated @types/[email protected]: See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/12826
/usr/bin/polymer -> /usr/lib/node_modules/polymer-cli/bin/polymer.js

[email protected] install /usr/lib/node_modules/polymer-cli/node_modules/wd
node scripts/build-browser-scripts

/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:90
throw err0;
^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/polymer-cli/node_modules/wd/build'
at Object.fs.mkdirSync (fs.js:891:18)
at sync (/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:71:13)
at Object. (/usr/lib/node_modules/polymer-cli/node_modules/wd/scripts/build-browser-scripts.js:6:1)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node scripts/build-browser-scripts
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/muhssin/.npm/_logs/2017-09-07T01_34_20_780Z-debug.log
muhssin@Muhssin:~$ polymer
polymer: command not found
muhssin@Muhssin:~$ polymer init
polymer: command not found
----------------- END -----------------

All 4 comments

The error seems to be
Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/polymer-cli/node_modules/wd/build'

in this isue of polymer-cli is explained something similar
https://github.com/Polymer/polymer-cli/issues/832

you colud try to install the cli in nvm as local user and avoid this kind of permisions errors

I use https://github.com/tj/n to be my node version manager

this problem did not solve with me
but this command is solve for me :+1:
muhssin@muhssin:~$ ~/node_modules/polymer-cli/bin/polymer.js

/\藴藴/ /\藴藴/\
/__\/ /__\/__\ Polymer-CLI
/\ / /\ /\ /\
/__\/ /__\/ \/__\ The multi-tool for Polymer projects
\ /\ /\ / /\ /
\/__\/__\/ /__\/ Usage: polymer <command> [options ...]
\ /\ / /\ /
\/__\/ /__\/

Available Commands

analyze Writes analysis metadata in JSON format to standard out
build Builds an application-style project
help Shows this help message, or help for a specific command
init Initializes a Polymer project
install installs Bower dependencies, optionally installing "variants"
lint Identifies potential errors in your code.
serve Runs the polyserve development server
test Runs web-component-tester

Global Options

--env type The environment to use to specialize certain
commands, like build
--entrypoint The main HTML file that will be requested for
all routes.
--shell string The app shell HTML import
--fragment string[] HTML imports that are loaded on-demand.
--root string The root directory of your project. Defaults
to the current working directory.
--sources string[] Glob(s) that match your project source files.
Defaults to src/**/*.
--extra-dependencies string[] Glob(s) that match any additional
dependencies not caught by the analyzer to
include with your build.
-v, --verbose turn on debugging output
-h, --help print out helpful usage information
-q, --quiet silence output

Run polymer help <command> for help with a specific command.

muhssin@muhssin:~$

Glad your issue was resolved! Closing it for now. For those also encountering this issue, please check out https://github.com/Polymer/polymer-cli/issues/832#issuecomment-320238339

Was this page helpful?
0 / 5 - 0 ratings