I have installed Grunt & Bower & I'm using ZSH.
when I type bower --help or grunt anything I get zsh: command not found: bower or zsh: command not found: grunt how can I fix this?
Add /usr/local/share/npm/bin/ to your $PATH environment
I couldn't get the above to work. Problem was that I had just reinstalled my Mac and forgotten to re-install grunt.
You can test that grunt is actually installed and working properly outside of zshell by going back to bash with bash -l and running grunt.
If grunt is throwing the same error you can install grunt by running:
sudo npm install -g grunt-cli
Run zsh to get back to zshell.
When you installed, did you install globally?
npm install -g bower
give that a try. If not, also try adding sudo
sudo npm install -g bower
When you install grunt (bower), terminal tell you directory. For those using a ZSH shell, add this to .zshrc:
export PATH=/usr/you/directory/npm/bin:$PATH,
I find it using:
/lib/node_modules
export PATH=/usr/lib/node_modules/npm/bin:$PATH
I used yarn instead of npm:
yarn add grunt grunt-cli
yarn grunt
It worked for me.
Hopefully, it will help someone else :)
If you are using the GNOME-Terminal (default in Ubuntu Unity and Gnome) try the answer of https://askubuntu.com/questions/279180/nvm-command-not-found-issue.
Related
On a development server, for an application barely deployed, rails commands won't execute because of lack of integrity file.
error Couldn't find an integrity file
error Found 1 errors.
========================================
Your Yarn packages are out of date!
Please run `yarn install --check-files` to update.
========================================
Both
yarn install --check-files
yarn install
lead to the same error
compression-webpack-plugin#4.0.1: The engine "node" is incompatible with this module. Expected version ">= 10.13.0". Got "8.17.0"
Found incompatible module
Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The 'visit' prompt is unfortunately of no use, as it does not deal with the node engine.
Being barely deployed, there is no node-modules directory yet, which is expected. However on development machine there is the directory and no issues whatseoever in precompiling assets.
Server context:
node -v
> v8.17.0
How can this situation be unblocked?
you need to update the node to a version higher than the one mentioned >= 10.13.0 then re-install yarn and re-run the check:
if you're on Mac OS:
brew install node#14 && brew link --force node#14
brew install yarn
if you're on Linux:
cd ~
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
then check if you have a compatible version
node -v
=> v14.2.0
``
if so re-run any of your commands:
```bash
yarn install --check-files
yarn install
I am trying to deploy my Rails app to Elastic Beanstalk using the CLI. The rails app deploys fine (asset compilation, db migration, etc.). However, I'm not able to run bower install. I tried running sudo npm install -g bower and it installs to \opt, but when trying to run a bower command it doesn't recognize bower as being installed in the system.
These are my questions:
1) Why isn't bower accessible from my app directory?
2) How do I get it so that EB automatically runs rake bower:install (I'm using the bower-rails gem to be compatible with the asset pipeline)?
3) How do I get it so that EB automatically installs npm so that part 2 will work above?
Thank you and hopefully my question makes sense. (Relatively new to AWS)
I found out a better solution. Rather than using the Bower Rails gem, just use a standard bower.json file in the root directory.
Then, create a config file: .ebextension/ruby-settings.config with the following contents:
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/03_bower_install.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
echo "starting to install bower via npm"
sudo npm install bower -g --prefix /usr/local --allow-root
echo "starting to install git"
sudo yum install git
echo "changing directory to /var/app/ondeck"
cd /var/app/ondeck
ls
echo "running bower install"
sudo $(which bower) install --allow-root
This utilizes elastic beanstalk's pre deploy hooks, and allows installation of bower and bower install to run before asset precompilation.
I have tried with command:
npm -install -g appium#1.6
but when I restart Appium, it is still in 1.5.3 version.
There are two different types of appium tool avaliable
Appium GUI
Appium command tool
It seems you updated to the command tool of appium and launch the appium GUI then you are checking the version.
Till now there is no GUI for appium1.6.
If you are checking command tool then there is some issue, you need to uninstall and install appium.
You can do
1. npm uninstall -g appium
2. npm install -g appium#1.8.1
3. appium -v
#is for specific version
Appium 1.8.1
If you have an old version of Appium server than you can update it without uninstalling it by executing following command in terminal or command prompt
npm -g update appium
This will update your Appium version to the latest version.
In case you want to update to a specific version than execute the following command:
npm update -g appium#1.6
I have had similar issues upgrading to a higher version of appium.
This has worked for me whenever I have problem with appium
npm uninstall -g appium
npm cache clean --force
Then do,
npm install -g appium#1.6
or
npm install -g appium
To get the latest version of appium
You can run below command in terminal to install appium 1.6
npm install appium
For this you need node.js to be installed in your machine
You can specify the version of the appium to be installed by using below command
npm install appium 1.6.3
try
npm install appium -g
you should get the latest stable version.
But if you are looking to install a specific beta, use following command from terminal:
npm install -g appium#1.6
Try out without -g, it should work without it. Also your version is wrong, use that one:
npm -install appium#1.6.1
This worked for me:
npm install appium -g
It by default installed the latest.
Try this command
npm install -g appium#1.6.0
I can't get FlowType to install on Mac OS using brew. I typed:
$> brew update
...
$> brew install flow
Error: You must `brew link objective-caml' before flow can be installed
$> brew link objective-caml
Linking /usr/local/Cellar/objective-caml/4.02.1_2...
Error: Could not symlink share/man/man3/Weak.S.3o
/usr/local/share/man/man3 is not writable.
$>
What's wrong?
Please Try change Permission
sudo chown -R $USER /usr/local/lib
The official installation method for flow is locally per-project using yarn (or npm).
yarn add --dev flow-bin
OR
With npm:
npm install --save-dev flow-bin
See the full instructions at https://flow.org/en/docs/install/
Using Ubuntu debian flavour, have been unsuccessfully trying to install protractor following:
the AngularJS official docs tutorial
by installing nodejs, npm and then downloading protractor from github repo as suggested here.
finally by installing the protractor-rails gem as per this SO.
I can see my nodejs version being: v0.10.25 and npm version being 1.3.10
however when I run either npm install protractor, or npm install -g protractor or follow the steps as per Protractor::Rails
in all cases I get the same error:
Ideas anyone?
Basically, this is a problem of permissions for creating directory.
You should try to set the permission on npm directory in your home dir.
sudo chown -R `whoami` ~/.npm
It is indeed a permissions issue coupled with some linux legacy code.
For those who may run into the same issue, a few steps to follow to sort this out:
the Debian installation has a legacy dir called node, this dir has to be removed and the package nodejs-legacy be installed instead.
Once nodejs-legacy has been installed, you may run the protractor installation (in your project folder) as follows:
sudo npm install -g protractor
once installation is finished check your
protractor --version
you should then get a Version 2.0.0 (as of today in my case)
You should be ready to update your webdriver and fire it up.