Install extension in Yii2 - npm

Hi can someone show me steps how can I install fabric.js in yii2 project? This is Fabric.js: link to github
There I can see that I can install fabric.js only by bower or npm. I don know that i have bower on start in Yii2 procejct or I should I install this bower. Now I only used composer install and update. And I dont know how to install this in my project. Maybe anyone can show me easiest way to install this by composer only or other easy way? I tried to write command :
bower install fabric
but i have error:
bash: bower: command not found

Make sure you have got Composer asset plugin installed. If not run console command:
composer global require "fxp/composer-asset-plugin:^1.2.0"
All you have to do now is to add in require section of composer.json
"bower-asset/fabric": "*"
and run composer update command in console (in the project folder).

Related

How to install simple plain Javascript autocompletion in NeoVIM using yarn?

So I want to install JavaScript support as I have already installed coc.nvim plug-in and node.js, but the nvim says the following:
So I do the following:
I create .config/nvim/plugged/coc.nvim (Because plugged folder was not created)
Inside coc.nvim I type: sudo npm install -g yarn
yarn install
yarn build
Now, It says: error Couldn't find a package.json file in "/home/dru7/.config/nvim/plugged/coc.nvim"
So I type yarn add javascript - PACKAGE NO LONGER SUPPORTED
7)I can delete everything inside coc.nvim and I want to install correct dependency, how?
So how do I add simple autocompletion ( for Javascript into an empty coc.nvim file?

Need help installing the VUE plug in for TestCafe

I am new to the product and have minimal coding knowledge. I need to install the testcafe-vue-selectors plugin but the instructions on the github page are lacking detail. The say Install "$ npm install testcafe-vue-selectors" Where do I run this command?
Thanks and sorry for my lack of knowledge.
I assume that you have already installed TestCafe by running a single command in your terminal (command-prompt):
npm install -g testcafe
To install the plug-in, you need to execute a similar command in your terminal (in your project folder):
npm install testcafe-vue-selectors
No additional steps are required. Just ensure that Node.js and npm are installed on your computer.

PNPM install did work but ProdBuild is failing

I've used pnpm install and it did work for me. But when doing ProdBuild it failed:
For the same project earlier using npm install and npm run ProdBuild worked without having any issues. But doing a prod build using pnpm is failing. Can someone help me out please?
I see that you use Angular. Angular projects currently work only when shamefully-hoist is true. You can create a .npmrc file in the root of your project and put shamefully-hoist=true there. Then reinstall the dependencies with pnpm install.
Also, if typescript is not in you dependencies, you may have to install it with pnpm add -D typescript

Why does coffeescript need to be installed globally?

I have a jenkins build that is failing with the following error:
+ npm install
npm WARN prefer global coffee-script#1.12.4 should be installed with -g
Curious as to why coffee-script, or any package for that matter, needs to be installed globally?
Because coffeescript is a command line tool which can transpile coffeescript into javascript, or run as as an interactive shell similar to node.
from the NPMJS docs:
There are two ways to install npm packages: locally or globally. You choose which kind of installation to use based on how you want to use the package.
If you want to use it as a command line tool, something like the grunt CLI, then you want to install it globally. On the other hand, if you want to depend on the package from your own module using something like Node's require, then you want to install locally.
It would technically be possible to install these CLI packages locally, but then you would have to run them using a relative path such as(untested):
./node_modules/coffeescript/bin/coffeescript

Command invalid: run always ask to create a project

I have a project about 4 months and suddenly the aurelia's CLI commands are not working.
When I try to execute au run --watch I receive a message with options to create a new project under the path.
I have already tried to uninstall and reinstall the aurelia CLI, It's not work.
The last thing I have done was to execute a git clean -xdf
I think that could be something on my project. Someone could help me?
ANSWER
After some attempts I fixed the problem:
1) I reinstall Git and Node;
2) I have deleted all the files under the \AppData\Roaming\npm-cache path;
3) I have checked if the Git and Node were in the PATH of environment variables;
4) I run the npm install command;
Is aurelia-cli included in the devDependencies of the project and also installed globally?
First, install globally:
npm i -g aurelia-cli
Then, in the project directory, install & save to devDependencies:
npm i --save-dev aurelia-cli
You should then be able to run au in the project directory and see that the build and run commands are now available.
Note that you'll also need to install the necessary gulp dependencies required by the tasks in your project devDependencies.
EDIT: See aurelia/cli/issues/485 which confirms that installing aurelia-cli as a local dependency fixes this issue.