Can't Access Dart sass from Git Bash - css

I just installed Dart sass and configured the PATH and everything. When I try to access the sass command from Git Bash it displays: bash: sass: command not found. However, when i try to access it from the CMD it works. Given that I got used to UNIX commands in Git Bash, is there something I need to configure to give access to Git Bash to read the sass command?

Related

Compiling Jaeger gRPC proto files with Python

I'm currently playing around with Jaeger Query and trying to access its content through the API, which uses gRPC. I'm not familiar with gRPC, but my understanding is that I need to use the Python gRPC compiler (grpcio_tools.protoc) on the relevant proto file to get useful Python definitions. What I'm trying to do is find out ways to access Jaeger Query by API, without the frontend UI.
Currently, I'm very stuck on compiling the proto files. Every time I try, I get dependency issues (Import "fileNameHere" was not found or has errors.). The Jaeger query.proto file contains import references to files outside the repo. Whilst I can find these and manually collect them, they also have dependencies. I get the impression that following through and collecting each of these one by one is not how this was intended to be done.
Am I doing something wrong here? The direct documentation through Jaeger is limited for this. The below is my basic terminal session, before including any manually found files (which themselves have dependencies I would have to go and find the files for).
$ python -m grpc_tools.protoc --grcp_python_out=. --python_out=. --proto_path=. query.proto
model.proto: File not found.
gogoproto/gogo.proto: File not found.
google/api/annotations.proto: File not found.
protoc-gen-swagger/options/annotations.proto: File not found.
query.proto:20:1: Import "model.proto" was not found or had errors.
query.proto:21:1: Import "gogoproto/gogo.proto" was not found or had errors.
query.proto:22:1: Import "google/api/annotations.proto" was not found or had errors.
query.proto:25:1: Import "protoc-gen-swagger/options/annotations.proto" was not found or had errors.
query.proto:61:12: "jaeger.api_v2.Span" is not defined.
query.proto:137:12: "jaeger.api_v2.DependencyLink" is not defined.
Thanks for any help.
A colleague of mine provided the answer... It was hidden in the Makefile, which hadn't worked for me as I don't use Golang (and it had been more complex than just installing Golang and running it, but I digress...).
The following .sh will do the trick. This assumes the query.proto file is a subdirectory from the same location as the script below, under model/proto/api_v2/ (as it appears in the main Jaeger repo).
#!/usr/bin/env sh
set +x
rm -rf ./js_out 2> /dev/null
mkdir ./js_out
PROTO_INCLUDES="
-I model/proto \
-I idl/proto \
-I vendor/github.com/grpc-ecosystem/grpc-gateway \
-I vendor/github.com/gogo/googleapis \
-I vendor/github.com/gogo/protobuf/protobuf \
-I vendor/github.com/gogo/protobuf"
python -m grpc_tools.protoc ${PROTO_INCLUDES} --grpc_python_out=./python_out --python_out=./python_out model/proto/api_v2/query.proto
This will definitely generate the needed Python file, but it will still be missing dependencies.
I did the following to get the Jaeger gRPC Python APIs:
git clone --recurse-submodules https://github.com/jaegertracing/jaeger-idl
cd jaeger-idl/
make proto
Use the files inside proto-gen-python/.
Note:
While importing the generated code, if you face the error:
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
Do:
pip3 install --upgrade pip
pip3 install --upgrade protobuf

How to add firebase to my bash profile? [duplicate]

This question already has answers here:
firebase-tools "-bash: firebase: command not found"
(32 answers)
Closed 6 years ago.
I have been having trouble installing firebase command line tools. I am following the guide at: https://www.firebase.com/docs/hosting/command-line-tool.html. I have run the initial command into my terminal: npm install -g firebase-tools. Once I run: firebase init in the root of my directory, I get the following error:
-bash: firebase: command not found
I have looked at guides how to manually modify my bash profile, but can not figure out how to do so... Shouldn't my bash .bash_profile automatically get modified when I run a global command?? Any help would be appreciated. I just need my firebase commands to work in the terminal, and why the global command won't register in my bash profile?
When you run npm install -g firebase it tries to install the firebase library and associated binaries into a system-wide location. You can determine where this location is by running npm prefix -g. In order for the firebase binary to be available to your bash session, the bin directory inside your global npm prefix must be on your path.
In Bash, an easy way to add a directory to your PATH is by modifying the .bashrc file in your home directory. Appending a line like so will add the global npm bin directory to your current PATH:
PATH="$(npm prefix -g)/bin:$PATH"
Once you have modified your PATH variable either open a new terminal session or run export PATH="$(npm prefix -g)/bin:$PATH" for the change to immediately take effect.
If ~/.bashrc is not being sourced on your machine, an easy fix is adding the following line to your ~/.bash_profile file:
source "$HOME/.bashrc"

Can't open Sqlite on Git Bash

I'm trying to access my sqlite database on my current directory at /c/wamp/www/laravel5 on my local project folder, with windows as my OS. I added the sqlite3 executable on the directory.
The database doesn't seem to open using git bash. When using the default command in windows command prompt it works seamlesly. sqlite3.exe storage/database.sqlite
Tried on Git Bash:
$ ./sqlite3.exe
and
$ ./sqlite3.exe storage/database.sqlite
These didn't work.
The error message is:
bash: sqlite3.exe: command not found
Here's a snapshot:
I'd like to see the database tables and schema using git bash since it has cooler font colors compare with the windows cmd.
Any help would be greatly appreciated.
if you have the same problem I had, then see my question here.
In short, using "winpty" to start sqlite3 worked:
$ winpty sqlite3
Building on the previous answer by #user172431, add the following alias to your .bashrc
alias sqlite3="winpty sqlite3.exe"
This will make the workflow a tad quicker and feel like a ninja rock-star in the process. I use this shortcut via Git Bash

'RM' is not recognized as an internal or external command while using Meteor on Windows

i am currently having problem with 'meteor' and i am currently new to this learning this stuff. So, after installing 'Meteor' i opened command prompt on Windows and typed :
meteor create goodboy
and then,
cd goodboy
But to delete the live and already running example app, i used :
rm goodboy.*
But the command prompt, gave this error :
rm is not recognized as an internal or external command, operable
program or batch file.
Is there anyway i can fix this error, thank you.
Use del on Windows.
Also, this has nothing to do with Meteor. You can also delete a Meteor project by going to the folder and dragging it to the trash.
If you are on windows, git bash may run such commands.
If you are using Mac then we can simply use
rm -f src/*
and For windows we can use command for this is
del -f "src/*"
Hope this works fine for you.
Download and Extract PortableGit.
This has most of commonly used Linux based tools ported to windows.
Add [PortableGit Path]\usr\bin to PATH variable of Windows
You can also use your system's Git installation instead of PortableGit.
This should solve the problem
I'm running Git shell prompt and for some reason it doesn't have it any more. I ended up using Cygin to get it working:
https://www.cygwin.com/
My penny's worth.
You could potentially add rm to powershell. In your (or a) profile.ps1 (or other if your powershell is not core).
rm {
del
}
or as an alias
Set-Alias rm del
or (and this is a tricky one), run WSL, bind the target folder and run via the linux interface.
PS: running the command via the Git Bash (MINGW64) terminal as suggested above, did the trick for me.
I guess you are not using bash terminal. Try this..
1- Go to the folder that you want to remove its contents lets call it my-app folder.
2- Right click in the empty space, then choose get Bash here.
3- Paste the command rm -f A_folder/* (I'm about to remove the content inside A_folder folder which is a sub-folder inside my-app).
4- Hit enter.
That should remove all content from A_folder folder.
Hope that helps.
I guess you are not using the Git Bash terminal but the normal command prompt.
Do try the same on the Git Bash terminal and you would not face this error anymore.
first, install linux clients for windows, I use Ubunto LTS
then install node.js and run your command again.
here, you find good instructions to do it so, as well as how to install cool new Windows Terminal
you should add
"remove-build": "rmdir /s /q build",
"create-build": "mkdir build",
"clean": "npm run remove-build && npm run create-build",
in package.json

gulp-ruby-sass - 'sass' is not recognized as an internal or external command, operable program or batch file

I'm trying to run gulp-ruby-sass on Windows.
I've already installed Ruby and Sass like that:
$ gem install sass
My gulp.task looks like this:
gulp.task('styles', function() {
return sass('src/scss/**/*.scss')
.on('error', sass.logError)
.pipe(gulp.dest('css'));
});
When I cd into the root directory of my project and run $ gulp styles,
I get this:
[22:54:52] Using gulpfile c:\wamp\www\wordpress\
wp-content\themes\bootscores\gulpfile.js
[22:54:52] Starting 'styles'...
[22:54:52] 'sass' is not recognized as an internal or external command,
operable program or batch file.
Error in plugin 'gulp-ruby-sass'
Message:
Gem undefined is not installed.
[22:54:52] Finished 'styles' after 89 ms
I've been searching for a solution to this problem for about two hours now and still haven't found one that would help me.
I've finally found a solution.
I had to manually add a path to my Ruby bin folder in Control Panel > System > Advanced > Environment Variables. Here i added a new variable named path with a path to my Ruby bin folder (C:\Ruby22-x64\bin).
Then I restarted my Node.js command prompt and got the output I was looking for.
Thank you, CDF, for you answer and effort!
Even though I answered this question myself, I hope it will eventually help other people too.
I had the same error, only in my situation sass package wasn't installed in RubyGem.
You need to execute following command:
gem install sass
Use the Ruby installer and reinstall it. Then check the path checkbox. It should be resolved then.
Install Sass Using the Command Prompt
[CMD] + [R]
type cmd hit [ENTER]
Type gem install sass
If you get an error message then it's likely you will need to use the sudo command to install the Sass gem. It would look like:
sudo gem install sass
4 Reboot the NODE command line. In fact you might want to reboot the system, most users do not do enough of that.

Resources