polymer : command not found - polymer

I am using ubuntu 16.04. I have install polymer-cli npm install -g polymer-cli which is properly installed but when I enter command polymer server
it is throwing error that polymer:command not found.

To check if a package is globally installed you can take a look at the npm root folder.
npm root -g will show you the root folder
ls $(npm root -g) therefore lists all public installed packages.
If you do not find polymer-cli there then your global installation was not successful... if you find it there but you still can not use it you probably want to try to reinstall it.

For me the answer relied in the fact that the bin folder of node wasn't defined in PATH.
The fix for me was to add it to the export PATH= part in my .zshrc-file or, if you don't use ZSH, .bash_profile. To know what to add to this PATH export run npm bin -g. For me the output was /usr/local/Cellar/node/11.14.0_1/bin. After this I opened my .zshrc-file and added the :/usr/local/Cellar/node/11.14.0_1/bin to the PATH definition. Notice the : which distinguishes a new location.
export PATH="$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/usr/local/Cellar/node/11.14.0_1/bin"
Good luck!

If polymer-cli is globally installed successfully, change your path environment variable - add polymer.js' parent directory to it and polymer serve will work. You'll find polymer.js in .npm-global/bin

Related

compiler cannot find libvideogfx

I am trying to install libde265 from source but one of its dependencies is giving me problems. I also installed this depedency from source but I converted it to an rpm package before completing installation.
When I look for the location of this library I get:
$ whereis libvideogfx
libvideogfx: /usr/local/lib/libvideogfx.la /usr/local/lib/libvideogfx.a /usr/local/lib/libvideogfx.so
The flags I have added to the ./configure command such as LIBS are not working and I don't know the root of the problem.

Polymer 2 seeing app directory for elements?

When I use polymer init to create a polymer 2 element, I see that an /app directory is created. Is this expected? I'm being told by my team members that there should be no /app directory installed when creating a polymer 2 element.
I used npm install -g polymer-cli#next for the install. Also tried uninstalling and reinstalling again.
Any ideas are appreciated.
According to the docs this is not an expected behaviour.
This is not also a behaviour of the old version of the polymer-cli.
Can you please show your prompt result after running the command?
I found out that the issue was related to having a .bowerrc file in a parent directory. In there, the 'app' directory was specified. I simply had to remove the 'app' reference and when I ran bower install again bower_components were installed without the app directory.

Typings install gives 'No dependencies' as output

I am trying to install a Ionic 2 template.
Following the readme gets until the point where I need to install typings dependencies. After the installation of the typings CLI with npm install typings --global, I should install all the dependencies stated in the typings.json package (already provided by the template in the project folder).
This is how the typings.json file looks like:
{
"dependencies": {},
"devDependencies": {},
"ambientDependencies": {
"cordova": "registry:dt/cordova#0.0.0+20160316155526",
"cordova/plugins/statusbar": "registry:dt/cordova/plugins/statusbar#0.0.0+20160316155526",
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c"
}
}
As stated in the title, it gives me No dependencies as output and it doesn not install anything contained in that config file.
Could it be something related to having installed typings with sudo as a global package? Maybe it is looking for a config file in another directory?
Thanks!
This is most likely the update from 0.* to 1.*. Check the release notes
https://github.com/typings/typings/releases/tag/v1.0.0
Changes
Many breaking changes (see https://github.com/typings/core/releases/tag/v1.0.0)
Renamed ambient to global
Updated typings/ directory structure (removed browser.d.ts by default, should use typings/index.d.ts by default)
Killed defaultAmbientSource (no more auto-install of DefinitelyTyped when using --ambient, explicitly use dt~)
Replace ! parser expansion symbol with ~ (! is a reserved bash symbol)
Ability to specify different resolutions and output directories using resolution in typings.json
Using tslint-config-standard for linting rules
Fixing it for me was just replacing "devDependencies" with "globalDependencies" in my typings.json.
I had the same problem. I had to install node.js again (there was a newer version when I installed it again, 6.2.0) with the installer, node-sass with npm (I don't know if you need this one) and then the installation of typings worked.

How to install grunt file for bootstrap

I need to install bootstrap. So far I have done step 1 succesfully. I was able to install the grunt file but step two is giving me problems for days, and I do not want to spend a next day on it.
step 1: Install grunt-cli globally with npm install -g grunt-cli
step 2: Navigate to the root /bootstrap/ directory, then run npm install. npm will look at the package.json file and automatically install the necessary local dependencies listed there.
Whenever I do npm install, I get npm can't find a package.json file in your current directory. Well I do not know how to get it to my current directory, at the comand prompt it is C:\Users\Crisp>. the bootstrap file is in this directory C:\Users\Crisp\bower_components\bootstrap. There you will see the package.json file.
I really do not know what to do! I have searched on this site for supposed answers but no one says how to change the directory or actually get it to work. There is nowhere I see how to change a directory or root director but everyone keeps saying change root directory I am not a tech man, I do not know. PLEASE I NEED HELP!
I think what you are looking for if you are following instructions in this link (http://getbootstrap.com/getting-started/) you can go to the root directory by command line:
cd bower_components
then
cd bootstrap
just in case, to determine your current directory just type pwd
good luck
#contactmzn

Installing behat with mink on windows using composer

I am trying to install mink/behat on windows machine using composer by following the help given on behat page. http://docs.behat.org/cookbook/behat_and_mink.html.
But when I run
php composer.phar install
then I get the error
But I have composer.json(exactly same as described in behat page) file in mentioned directory. Can someone please guide me how can I install it. Thanks
Composer installs packages on project-base. I don't think you have a PHP project inside C:\Windows\system32...
Navigate to your project by using cd (change dir) and be sure the composer.phar file is automatically loaded in every directory (see this answer).
Then create a composer.json file in which you put the things that is stated in the docs.
After that run composer install (or php composer.phar install, depends on which install method you used).