protoc-gen-js: program not found or is not executable - grpc

Trying to compile my protos - I need to compile them to use in my react app. But I get this error. I run the command as follows:
cd src/main/proto && protoc -I=. *.proto --js_out=import_style=commonjs:. --grpc-web_out=import_style=commonjs,mode=grpcwebtext:.
Where can I find protoc-gen-js? I didn't come across any repo for it.

As of July 2022, there is a known bug in protoc versions 21.1 and 21.2 (and libprotoc 3.21.1 and libprotoc 3.21.2).
See protobuf issue #10114.
For now, recommend downgrading to version 20.1 (libprotoc 3.20.1).

For Mac users using brew and the provided link by Christopher Peisert
what worked for me was the suggested workaround:
$brew install protobuf#3
$brew link --overwrite protobuf#3

run this command this command will globally install protoc-gen-js
npm install -g protoc-gen-js

Related

how to uninstall or remove a deno script?

I have installed a deno script by running :
deno install https://deno.land/std/examples/welcome.ts
How do I uninstall this script now ?
Is there a subcommand in deno that can uninstall installed scripts ?
Unfortunately deno uninstall was removed
The current solution is to do:
rm $(which file_server)
But an issue regarding uninstall was reopened 6 days ago, so it may come back in the near future.
Remove it manually from $DENO_DIR/bin (defaults to $HOME/.deno/bin)
E.g. on Windows, I ran the following in PowerShell:
PS > rm $HOME/.deno/bin/myscript.cmd

IOS mobile automation

I am new to IOS automation testing. I have to install appium for automation on actual physical device. I have followed a number of links but I am still confused. I have installed appium and xcode. But when I run appium inspector I always get error 'Could not launch Appium Inspector'. What could be the possible cause? Also can someone suggest a link which I can follow for appium set up on MAC.
Here's a very basic list of things you need to have to make Appium work for iOS:
It's helpful to use Homebrew to install some of these items.
https://brew.sh/
First you need to have ruby version 2.2 or higher to utilize the newest appium. I would suggest you use a ruby manager like RVM to install this Ruby.
\curl -sSL https://get.rvm.io | bash -s stable
Then install a ruby version above 2.2 (I personally default to 2.4.0):
rvm install 2.2.0
you can set a default rvm to use for convenience:
rvm default 2.2.0
If you don't set the rvm default you will have to use the "rvm use rubyversion" command every time you open a terminal.
Node.js: Essential, can not do without.
brew install node
(Note: DO NOT INSTALL WITH SUDO)
Appium Desktop: Convenient implementation of appium for building test cases. Uses a GUI and has inspector build in.
https://github.com/appium/appium-desktop
Appium CLI: command line Appium which is best for running multiple devices at once.
npm install -g appium
npm install -g appium-doctor
Check the Doctor: You can use appium doctor to diagnose what next steps you need to do next. Run it with the --ios or --android tags to find out what you need for each of these operating systems. You'll have to make adjustments to your .bash_profile so Appium can find your JDK folder among other things.
Authorize iOS testing on your computer:
npm install -g authorize-ios
sudo authorize-ios
Carthage: required to automate after Xcode 8
brew install carthage
brew update carthage
Hopefully this will help to diagnose what is going on with your set up. If you're using ruby to do your automation scripts don't forget to actually download the appium_lib gem:
sudo gem install appium_lib
Good Luck!
Check this out latest appium desktop :
AppiumDesktop1.1.0beta4 iOS setup - Inspector and Record the scripts,
Link : https://www.youtube.com/watch?v=2_xHmofGgUE
If you face any issue please comment it.

Building SQLITE for the Nodewebkit (Using express.js)

I am having problems compiling SQLite for use with Nodewebkit. After research, it seems that I am having wrong versions of the programs. So I have:
- Node
- NW
- SQLite
Apparently there must be certain version of each of the mentioned programs to make it work.
What versions of the programs I must have, so I can run this command:
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.12.3
This link suggests I should have NW version 0.8.x. But I cant find it for download. Or maybe that is not the problem at all...
I build on Mac using node-webkit v0.12.3 using the following commands:
sudo npm install nw-gyp -g
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=0.12.3
First, make sure you installed nw-gyp globally. Then, run the command either in the directory containing node-webkit executables (nwjs), or in a subfolder of that folder.
Running the command should then create a node_modules folder in the same directory as the binaries, containing the sqlite3 module.

No documentation available in Qt Creator

When I hit F1 while the cursor marks a classname in the source code, I get the message on the right side of my IDE: "No documentation available."
How can I fix this?
I run Qt on Linux Mint 17.1 and I'm just getting familiar with Linux :-)
Thank you.
As #WCoder suggested, run:
rm -fr ~/.local/share/QtProject* ~/.config/QtProject*
In addition, install Qt, the latest version of which is 5.5.1 at the time of writing this post: https://download.qt.io/official_releases/qt/5.5/5.5.1/
In Qt Creator, go to Tools → Options → Help → Documentation and add all the *.qch files in ~/Qt5.5.1/Docs/Qt-5.5 and the one in ~/Qt5.5.1/QtWebView/1.1/ (assuming you installed Qt into your home directory, ~/ ).
I had a strange problem (freeze after start QtCreator) and I got it fixed after remove the diretory ~/.config/QtProject
May be this is a problem too: ~/.local/share/QtProject
You can reload the help files with the qtcreator options.
In case QtCreator was installed from a system repository via sudo apt install qtcreator then one will need sudo apt install qt5-doc to get IDE's integrated help files.

In Qt Creator, examples are missed

Installed Qt Creator 2.8 in ArchLinux
Installed qt5-* (* as every related package) using pacman
examples were not available in the repositories so I used the one in the AUR, qt5-examples
examples are installed under /usr/share/doc/qt/examples
qmake-qt5 -query says:
QT_SYSROOT:
QT_INSTALL_PREFIX:/usr
QT_INSTALL_ARCHDATA:/usr/lib/qt
QT_INSTALL_DATA:/usr/share/qt
QT_INSTALL_DOCS:/usr/share/doc/qt
QT_INSTALL_HEADERS:/usr/include/qt
QT_INSTALL_LIBS:/usr/lib
QT_INSTALL_LIBEXECS:/usr/lib/qt/libexec
QT_INSTALL_BINS:/usr/lib/qt/bin
QT_INSTALL_TESTS:/usr/tests
QT_INSTALL_PLUGINS:/usr/lib/qt/plugins
QT_INSTALL_IMPORTS:/usr/lib/qt/imports
QT_INSTALL_QML:/usr/lib/qt/qml
QT_INSTALL_TRANSLATIONS:/usr/share/qt/translations
QT_INSTALL_CONFIGURATION:/etc/xdg
QT_INSTALL_EXAMPLES:/usr/share/doc/qt/examples
QT_INSTALL_DEMOS:/usr/share/doc/qt/examples
QT_HOST_PREFIX:/usr
QT_HOST_DATA:/usr/lib/qt
QT_HOST_BINS:/usr/lib/qt/bin
QT_HOST_LIBS:/usr/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.0
QT_VERSION:5.1.0
which means examples are in the right place
But they are not shown in Qt Creator!
How can I bring them in qtcreator?
PS: I don't wanna forget about the solution and install SDK.
I know OP asked for archlinux but I faced the same issue with Ubuntu 20.04. To solve it I had to install the following two packages:
sudo apt-get install qtbase5-examples qtbase5-doc-html
This will show the basic widget examples.
Additional examples (e.g. qt quick) can be added by installing them explicitly:
sudo apt install qtquickcontrols2-5-examples
To actually get them displayed in qtcreator I had to install:
sudo apt install qt5-doc qt5-doc-html
Here is the output of echo $(apt-mark showmanual | grep -P '(libqt|qt)')
cmake-qt-gui qt5-default qt5-doc qt5-doc-html qtbase5-dev qtbase5-doc-html qtbase5-examples qtcreator qtquickcontrols2-5-examples
Edit:
Also make sure to install the qml modules you need, for example:
sudo apt install qml-module-qtquick-controls2
QtCreator Examples are added in Official Repository 'Extra'
https://www.archlinux.org/packages/extra/any/qt5-examples/
install it using :-
sudo pacman -S qt5-examples
Navigate to the installation location of the examples and open the .pro project file with qt-creator.
Alternatively if you just want to build and run the example. Navigate to the directory qmake and then make and then simple run the output
Additionally if you strictly require the examples to show in the IDE, try launching with admin privileges as the installation directory of the examples may require admin privileges.
My situation is that qt example folder has no permission to read and execute for non-root users, fixed it and everything OK. In your case:
sudo chmod +rx /usr/share/doc/qt/examples
I am also using archlinux and have had the same problem. Despite not having the examples & demo installed the qmake-qt5 -query is printing a non-existence path.
It seems Qt5 examples are now on AUR(Arch User Repository).
To get the them
Download https://aur.archlinux.org/packages/qt/qt5-examples/qt5-examples.tar.gz
Extract the package maybe with $ tar xzf qt5-examples.tar.gz
cd qt5-examples which contains the PKGBUILD . Then run makepkg .This will download 165MB qt-everywhere-opensource-src-5.2.0.tar.xz
Run pacman -U qt-everywhere-opensource-src-5.2.0.tar.xz
Qtcreator cannot detect the example without its html file.
So, in my case I've already installed qtbase5-examples, but could not able to see examples in qtcreator.
After,
sudo apt-get install qtbase5-doc-html
examples are visible in qtcreator. It was the same with qt5serialport-examples.
sudo apt-get install qt5serialport-examples qtserialport5-doc-html
Have a nice one.
make sure you run the qt-opensource-linux-x86-android-5.4.0.run like this:
$sudo ./qt-opensource-linux-x86-android-5.4.0.run
please do not forget the "sudo"
or you will find that the examples in the qtcreator is missing.

Resources