I installed node, npm and coffee script and when I try to run the coffee command I get "-bash: coffee: command not found"
http://cl.ly/image/1Z2t1U1O1I0z
I'm not sure if the $PATH is whats wrong, all the google results would indicate thats my problem. Clearly I'm new to this and I went a little overboard but I tried added every path npm gave me:
$path = /usr/local/share/npm/bin/coffee:/usr/local/share/npm/bin/cake:/usr/local/share/npm/lib/node_modules/coffee-script/bin/cake:/usr/local/share/npm/lib/node_modules/coffee-script/bin/coffee:node_modules/coffee-script:/usr/local/share/npm/lib/node_modules/coffee-script:/Users/asmith:/usr/local/bin/node:/usr/local/bin/npm:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Human readable:
/usr/local/share/npm/bin/coffee
/usr/local/share/npm/bin/cake
/usr/local/share/npm/lib/node_modules/coffee-script/bin/cake
/usr/local/share/npm/lib/node_modules/coffee-script/bin/coffee
node_modules/coffee-script
/usr/local/share/npm/lib/node_modules/coffee-script
/Users/asmith
/usr/local/bin/node
/usr/local/bin/npm
~/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
Any help would be great!
Yes - this is a path problem.
The path you actually need is probably just /usr/local/share/npm/bin
You don't need to add the paths of the executables themselves, you need to add the path to the directory that they live in.
Related
I just installed Gradle, manually by downloading the zip and then unzipping it, and verified it installed fine with gradle -v .
I have it located at Users/username/gradle/ . I set it on the home path for linux by running this line:
export PATH=$PATH:gradle/gradle-5.2.1/bin/
However, when I try to init my first Scala project, I run this command:
gradle init --type scala-library
However, it complains that:
-bash: gradle/gradle-5.2.1/bin/gradle: No such file or directory
So fine, I check my directory structure, and that file is definitely in there. What gives?
You should check whether gradle file exists and is an executable ls -l gradle/gradle-5.2.1/bin/gradle. Also if Users/gradle/ means user's home directory shouldn't your path be something like $PATH:$HOME/gradle/gradle-5.2.1/bin/ ?
I need to install the bin artifact inside a specific folder, like /usr/local/bin
I've tried the following which doesn't help. Any idea what I miss here?
RUN wget http://host:8081/content/build/com/bp-pl/1.0.0/cli-bp-1.0.0-linux.bin | /usr/local/bin
RUN wget http://host:8081/content/groups/build.releases/com/bp-pl/1.0.0/cf-cli-bp-plugin-1.0.0-linux.bin -O /usr/local/bin/cf-cli-bp-plugin-1.0.0-linux.bin
I am using EJS as my view engine on a node and express setup. I want to use ejs-lint to help get the line for errors. I haven't use a linter before, but from reading through the documentation here: https://github.com/RyanZim/EJS-Lint
I'm assuming you can just check errors on a specified file in command line like this: ejslint
Are my assumptions right and what am I doing wrong? I've already installed using npm install ejs-lint --save-dev
Also, if I plan to add ESlint to my project I'm guessing I can have it work alongside EJSlint?
Short answer
Run it directly from the terminal:
./node_modules/.bin/ejslint src/templates/some-template.ejs
Or with npm script:
// package.json
{
...
"scripts": {
"lint:ejs": "ejslint src/templates/some-template.ejs"
}
}
// terminal
npm run lint:ejs
ESLint and EJSlint are different, exclusive processes. What is analysed by ESLint should not be analysed by EJSLint and vice versa. Having both installed will not cause any issues.
Extended answer
For what I have tested, you have to use the ejs linter CLI per file. Which is not as useful as eslint which can process multiple files, exclusions etc.
If you had some src/templates directory, you could lint all the EJS files by doing something like this:
find src/templates -type f -iname '*.ejs' -exec bash -c "./node_modules/.bin/ejslint '{}'" \;
Which would work for Unix but not for Windows. You could prepare some node script to do it cross system with the ejslint API.
There is also a grunt plugin for it.
If you want to have both ESLint and EJSLint, you should have different npm scripts for them, e.g:
// package.json
{
...
"scripts": {
"lint": "npm run lint:js && npm run lint:ejs",
"lint:js": "eslint src --ignore-path src/templates",
"lint:ejs": "find src/templates -type f -iname '*.ejs' -exec bash -c \"./node_modules/.bin/ejslint '{}'\" \\;"
}
}
If you are using grunt, you can create different tasks for eslint and ejslint and then create a group task:
grunt.registerTask('lint', ['eslint', 'ejslint']);
Actually, the following way is the easiest and by far the fastest execution time. It also has better error logging because it doesn't pass through the find command.
ejslint $(find ./ -type f -iname '*.ejs')
You can run npx ejslint **/*.ejs from the command-line in your project root to check all the ejs files in your project.
the npx is needed because you used --save-dev (or -D) if you used --global (or -g) then you can call ejs lint directly using ejslint **/*.ejs
**/*.ejs will select any file ending in .ejs in any folder.
they is no definitve instructions on usage ejslint on cmd. try and debug your lines of code yourself with a debug in your editor ,as it says its something to do with syntax error within your code. worked for me.!
Ohh ya and good news is that you can still run ESlint aswell to debug your Js files .
I have built a project using cmake (LLVM project) and tried to install it by issuing the following command:
$ cmake3 --build . --target install
If I run it using root then there is no problem and the files will be installed under the directory /usr/local/.
My problem is when I want to install the project using normal user.
I get the following error:
CMake Error at cmake_install.cmake:36 (file):
file INSTALL cannot set permissions on "/usr/local/include/llvm"
I have changed the permission of directory /usr/local/ to 777 recursively, and their ownership to root:wheel and I added my normal user to group wheel. But I still cannot install the files into the /usr/local/ directory.
The main issue is about building project in Eclipse which fails at "Build Install" command.
chmod 777 -R / is a very scary command. I've destroyed a system once by doing that.
The philosophy I use for this is:
If I need to deploy something through my IDE to debug or test before packaging, I deploy it locally within my home directory.
I only install stuff to my system (outside of home) if it has been packaged first (*.deb, *.rpm, *.tar.gz) so that I can remove it without problems.
For me, I do this with:
cmake $src
cmake --build . --target install -- DESTDIR=stage
This will configure my project, make it, then install it locally in a folder called ./stage which resides in my build directory. I can then run my executable from ./stage/usr/bin. Note that this only works if make is your generator.
Once I've tested it and I'm happy, I package it and deploy to my system or upload to a repository:
cpack
sudo dpkg -i <package>.deb
We should use USE_SOURCE_PERMISSIONS in our install function.
Example:
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Release/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" USE_SOURCE_PERMISSIONS)
sorry for the stupid question. I'd like to install the gas-preprocessor (https://github.com/yuvi/gas-preprocessor) but I just don't get how to do this. What do I have to do with the .pl-file? How do I install the script?
Thanks in advance,
Alex
Well i had the same problem "GNU assembler not found, install gas-preprocessor"
Later it turned out that i didnt had the correct file because i copy pasted the code in text editor
The correct way to do it is:
(a) Use the download button at https://github.com/yuvi/gas-preprocessor
(b) Extract the archive
(c) Remove any other file by same name which you have downloaded and you were experimenting with.
(d) copy the file gas-preprocessor.pl at /usr/local/bin
(e) Set permission of the file to Read and write by all (777) if a -> d doesn't work
I figured out this problem when i read config.log during compilation of ffmpeg
Run this command to install gas-preprocessor:
wget --no-check-certificate https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/master/gas-preprocessor.pl && \ chmod +x gas-preprocessor.pl && \ sudo mv gas-preprocessor.pl $(which gas-preprocessor.pl)
I had the same issue after following the above steps in OSX Lion. It seems that my /usr/local/bin directory was only accessible by root on my system (this path seemed to be owned by macports).
After putting gas-preprocessor.pl in /usr/bin the configure process ran fine.