I'm trying to install TailwindCSS on my Django App using this tutorial, unfortunly I'm stuck at this part
$ npm init -y && npm install tailwindcss autoprefixer clean-css-cli && npx tailwindcss init -p
When I try I get back this error:
bash: npm: command not found
I've downloaded and installed node.js and when I check using npm -v it seems that I have the 8.3.1 version and with node -v I got v16.14.0.
I've tried installing again TaiwindCSS and I still get the error
bash: npm: command not found
Can somebody help me understand what I'm doing wrong?
Thank you all
Related
I have mac and was trying to install Alexa cli with below command:
sudo npm install -g ask-cli
My installation was showing successful but it was giving me below error on ask --version :
-bash: ask: command not found
I am using node version > 12
Can any one help ?
I googled lot but could not found the answer. Got frustrated. So
finally thought of putting.
I have mac and was trying to install Alexa cli with below command:
sudo npm install -g ask-cli
My installation was showing successful but it was giving me below error on ask --version :
-bash: ask: command not found
I was using node version > 12
Finally after almost 6 hours of RnD i could solve this error by downgrading node to version 8
Below are the detailes what i did:
THis was my prev version which was giving error
Anands-MacBook-Air:~ anand$ node -v
v13.6.0
How to downgrade to lower version of node :
Anands-MacBook-Air:~ anand$ sudo npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
Anands-MacBook-Air:~ anand$ sudo npm install -g n
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ n#6.1.3
updated 1 package in 27.206s
Anands-MacBook-Air:~ anand$ sudo n 8 5.8
installing : node-v8.17.0
mkdir : /usr/local/n/versions/node/8.17.0
fetch : https://nodejs.org/dist/v8.17.0/node-v8.17.0-darwin-x64.tar.gz
installed : v8.17.0 (with npm 6.13.4)
Anands-MacBook-Air:~ anand$ node -v
v8.17.0
Then did below :
Anands-MacBook-Air:~ anand$ sudo npm install -g ask-cli
Anands-MacBook-Air:~ anand$ ask --version
1.7.22
Anands-MacBook-Air:~ anand$
Hope it will help someone.
If you use nvm, you might need to install it on your current Node.js version.
Exiting out of the terminal session and opening up a new terminal session solved this for me on MacOS.
Trying to install a plugin in redmine, using docker. I'm new to redmine, and just know the docker basics. I have no knowledge of Ruby, so idk how those Gemfiles installations work.
I'm trying to install Issue recurring. The installation instructions for the plugin look straightforward:
su - redmine
git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
cd /var/lib/redmine
bundle install
RAILS_ENV=production rake redmine:plugins:migrate
So I tried to translate that into a Dockerfile:
FROM redmine:3.3
RUN mkdir -p /var/lib/redmine/plugins/
RUN chown -R redmine:redmine /var/lib/redmine
#su - redmine
USER redmine
RUN git -C /var/lib/redmine/plugins/ clone https://github.com/cryptogopher/issue_recurring.git
#cd /var/lib/redmine
WORKDIR /var/lib/redmine/
#bundle install
RUN bundle install
#RAILS_ENV=production rake redmine:plugins:migrate
ENV RAILS_ENV production
RUN rake redmine:plugins:migrate
But what I get is:
...
Step 7/9 : RUN bundle install
---> Running in 1139cd4ccb43
Could not locate Gemfile
The command '/bin/sh -c bundle install' returned a non-zero code: 10
Am I doing something wrong here, or is there a bug in the plugin? Being inexperienced in Ruby, I cannot tell. I tried running "bundle install" in "/var/lib/redmine/plugins/" and "/var/lib/redmine/plugins/issue-recurring/" too, but same result.
For anyone looking for solution, it's here: https://it.michalczyk.pro/issues/15
Excerpt:
I found the problem. It's not installed under /var/lib/redmine/, it's installed under "/usr/src/redmine"! I was assuming /var/lib/redmine/ is the standard directory...
The installation instruction of the plugin seems to for non-docker scenario. Try "redmine bundle install" like they have done Here:
https://github.com/docker-library/redmine/blob/master/3.3/Dockerfile#L129
This is related to my previous question here which was never resolved. I am trying to fix the problem by doing a fresh reinstall of Ionic.
I first tried uninstalling Ionic with sudo npm uninstall -g ionic, and it completes with no errors, but doing ionic -v still outputs 2.1.1, so obviously it didn't really get uninstalled. After that I tried sudo npm install -g ionic#latest, and my problem still persists.
What is even weirder is what happened when I tried to create a new project from scratch to test it. I did ionic start test --v2 on my Ubuntu machine, and doing ionic serve still does the same thing that I stated in my previous question.
npm uninstall -g ionic
npm uninstall -g #ionic/cli
finally i was able to uninstall with this...
I had the same issue for resolving this
Run npm uninstall -g ionic
Go to the location "/usr/local/bin/"
Delete Ionic File
Close terminal
Open new terminal and run "npm uninstall -g ionic"
Now run "ionic -v"
This probably happens due to multiple installations of ionic in your machine, more so this happens on windows.
Run:
"where ionic" in your command prompt
if it does not work try :
"which ionic" !! (probably linux)
This will give you the location of your installed ionic, in windows its mostly ..Local\AppData\Roaming.. somewhere.
Go to that location delete ionic and ionic.cmd file there.
Run: ionic -v now, make sure it gives you an error.
Be Happy if you see error.
run: npm install ionic#latest -g now
Run: ionic -v, make sure you see your latest ionic version there.
Be more happy now.
Uninstall cordova and ionic.
npm uninstall -g cordova
npm uninstall -g ionic
Then check to make sure you have the right version:
ionic -v
Use this command please
npm uninstall -g #ionic/cli
What is your node and npm versions ?
Please update latest node js (https://nodejs.org/en/download/current/)
then check that
node -v
npm -v
Node version must be v8.5.0 (includes npm 5.3.0) and then
sudo npm uninstall -g ionic
sudo npm cache clean --force
sudo npm install ionic
check the ionic version
ionic -v
version will be ^3.10.1. If everything is ok you can use new project command as given below
ionic start --list
you can see what kind of project types here as an example
ionic start blank
You can try running the command as below, it worked for me:
sudo npm uninstall -g #ionic/cli
If you are checking the ionic version inside project folder then
try to remove the ionic cli without -g option. It may be possible that you have installed local version of ionic inside project.
If you're using nvm, remember to delete ionic from where ionic. I deleted it via nvm uninstall {{version}}.
unable to install ionic 2
Successfully Installed ionic2#beta using
sudo npm install -g ionic#beta
ionic -v shows version 1.7.14
Uninstalled using npm uninstall -g ionic
Successfully (based on printout) uninstalled ionic 2
ionic -v shows version 1.7.14 (WTF)
Tried npm uninstall -g ionic again
Received command prompt immediately, no other outputs (no affect)
ionic -v shows version 1.7.14
You have 2 choices.
As comment suggests do:
sudo npm install -g ionic#beta
You will have to do this for every global command as you dont have permission to the folders.
Or
Check npm fix permission issue
You can change the global node module directory of npm so that you wont need permission. You can also use app like homebrew to set up your node.
Since updating to ember-cli 1.13.8 and Ember 2.0.0 (from 1.13.1 / 1.12.x) I can't get the test suite to run on CircleCI, because of the error:
not ok 1 PhantomJS - Browser "phantomjs /home/ubuntu/app-name/node_modules/ember-cli/node_modules/testem/assets/phantom.js http://localhost:7357/7887" exited unexpectedly.
1..1
tests 1
pass 0
fail 1
npm ERR! Test failed. See above for more details.
npm test returned exit code 1
It used to work before and what is weird, it works locally (OS X El Capitan, PhantomJS 2.0). On CircleCI it also runs on 2.0 version which is installed the following way:
$ sudo apt-get update; sudo apt-get install libicu52
$ curl --output /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic https://s3.amazonaws.com/circle-support-bucket/phantomjs/phantomjs-2.0.1-linux-x86_64-dynamic
$ chmod a+x /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic
$ sudo ln -s --force /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic /usr/local/bin/phantomjs
Tried also downloading it from the Travis, but still the same thing happened.
Any idea what's the cause and how to solve it?
Try running phantomjs individually to find out which dependency is failing, I had the same issue on a Docker container and after running it i found out I needed an extra library to run it.
I was lacking the following dependencies on Ubuntu
libgtk2.0-0 libidn11 libglu1-mesa
Actually after updating Ember to 2.3.1 PhantomJS started to work without any problems, no idea what's the real reason behind this, but if anyone experiences this issue, try updating Ember and check again.