Deno: Denon installation with fish in mac - fish

Using fish for the installation of denon don't recognize it
steps:
Open fish terminal
deno install -qAf --unstable https://deno.land/x/denon/denon.ts
export PATH="/Users/user/.deno/bin:$PATH"
denon --init
output:
fish: Unknown command: denon
Deno version:
deno 1.28.3 (release, x86_64-apple-darwin)
v8 10.9.194.5
typescript 4.8.3
Denon 2.5.0

Solution:
export PATH="/Users/user/.deno/bin:$PATH"  ✔  ⬢ 16.17.0 
source ~/.profile
you could get the next error:
~/.cargo/env (line 4): 'case' builtin not inside of switch block
case ":${PATH}:" in
^
from sourcing file ~/.cargo/env
called on line 1 of file ~/.profile
from sourcing file ~/.profile
.: Error while reading file '/Users/user/.cargo/env'
go to .config/fish/
and nano config.fish
and paste the next exports so, it looks like this:
if status is-interactive
# Commands to run in interactive sessions can go here
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="/Users/user/.deno/bin:$PATH"
end

Related

VS Code and pytest: Where is the default junit-xml output path defined and why is there one?

I am trying to run a debug the tests of my Python project inside the VS Code interface.
I followed the instruction from VS Code's website using pytest but when trying to run a test the output fails:
============================= test session starts =============================
platform win32 -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: c:\Users\myUserName\Projects\myProjectName
plugins: localserver-0.5.0
collected 1 item
myProjectName\tests\test_static_analysis.py . [100%]
- generated xml file: C:\Users\MYUSERNAME\AppData\Local\Temp\tmp-26696NTXW7ChqfMEN.xml
-
============================== 1 passed in 0.18s ==============================
Error: Error: cannot open file:///c%3A/Users/myUserName/Projects/myProjectName/C. Detail:
Unable to read file 'c:\Users\myUserName\Projects\myProjectName\C' (Error: Unable to resolve
non-existing file 'c:\Users\myUserName\Projects\myProjectName\C')
Error: Error: cannot open file:///c%3A/Users/myUserName/Projects/myProjectName/C. Detail:
Unable to read file 'c:\Users\myUserName\Projects\myProjectName\C' (Error: Unable to resolve
non-existing file 'c:\Users\myUserName\Projects\myProjectName\C')
Maybe VS Code doesn't have the authorization to write in AppData.
What concerns me is why is VS Code launching pytest with a junit-xml output option?
The command actually executed by VS Code is:
c:; cd 'c:\Users\myUserName\Projects\myProjectName'; & 'C:\ProgramData\Anaconda3\envs\venv-myProjectName\python.exe' 'c:\Users\myUserName\.vscode\extensions\ms-python.python-2021.8.1105858891\pythonFiles\lib\python\debugpy\launcher' '53774' '--' 'c:\Users\myUserName\.vscode\extensions\ms-python.python-2021.8.1105858891\pythonFiles\testlauncher.py' 'c:\Users\myUserName\Projects\myProjectName' 'pytest' '--override-ini' 'junit_family=xunit1' '--rootdir' 'c:\Users\myUserName\Projects\myProjectName' '--junit-xml=C:\Users\MYUSERNAME\AppData\Local\Temp\tmp-26696pYh1w3pF2cXx.xml' './myProjectName/tests/test_static_analysis.py::TestStaticAnalysisVesselForceOnLateralCenter::test_pos_surge_on_vessel'
When going in Settings > python.testing.pytestArgs it is empty.
Where is this output path defined?
How can I change it to be in the local working directory?
Do I need to have a junit-xml output? Is it mandatory for VS Code UI to work?

"unresolved import"-error: including path for code completion and pylint in VSCode

In order to have code-completion and functioning linting, I'd like VSCode to include a specific path.
https://code.visualstudio.com/docs/python/environments#_environment-variable-definitions-file
I created a test environment
$ pwd
==> /Users/stephan/saitc/test_ws
$ ls -a
==> . .env tst_pckg
==> .. __init__.py
==> .DS_Store testing.code-workspace
$ cat .env
==> PYTHONPATH="/Users/stephan/saitc"
$ ls tst_pckg/
==> CONST.py __init__.py testing.py
$ cat tst_pckg/CONST.py
==> # -*- coding: utf-8 -*-
==>
==> TEST_CONSTANT = "Test constant's value"
$ cat tst_pckg/testing.py
==> # -*- coding: utf-8 -*-
==>
==> from test_ws.tst_pckg.CONST import TEST_CONSTANT
The setting "python.envFile" is set to "${workspaceFolder}/.env"
With this setup I would expect that VSCode is aware of the package "test_ws" but typing the line:
from test_ws.tst_pckg.CONST import TEST_CONSTANT
in the file "testing.py" gives my no reasonable code completion and "test_ws.tst_pckg.CONST" can not be resolved ("unresolved import"-error in the VSCode ui).
I'm using Anaconda on macos and the Visual Studio Code 1.30.1 which comes with it. Can it be that I have to start visual studio code from the directory "/Users/stephan/saitc/test_ws"? (if so how?)
With every start of Visual Studio Code I'm asked if I want to start the pylint extension. How can I turn this on permanently? (Python›Linting: Pylint Enabled, Python›Linting: Enabled)
Thank you,
Stephan
You can use the configuration "python.autoComplete.extraPaths": ["./your-source/folder"].
As far as I understand is the env file only used when you start a terminal and so on but not for the extensions.

gcc is not Creating an Output File

The following command (via PowerShell in Windows 7)
PS C:\Users\gvkv\projects\stats> C:\mingw\bin\gcc.exe .\lex.yy.c -o gmstats.exe -v output
gives the following output
gcc.exe: error: output: No such file or directory
Using built-in specs.
COLLECT_GCC=C:\mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
and I have no idea why. In particular, I don't understand the error at the top of the output. If I invoke gcc without the -v option:
PS C:\Users\gvkv\projects\stats> C:\mingw\bin\gcc.exe .\lex.yy.c -o gmstats.exe
I get:
PS C:\Users\gvkv\projects\stats>
Nominal success! This would be great if I also had gmstats.exe in my directory. Just for fun I've also tried running PowerShell as an administrator and I've also invoked gcc with an absolute path:
PS ...>C:\MinGW\bin\gcc.exe
just to make sure. I last used gcc to compile something (via make) and it worked fine.
I also considered that there was a linker (ld.exe) problem but there's no file to link and the search directories are fine.

Not able to compile PJSIP on Ubuntu for Blackberry 10

I am trying to compile PJSIP on Ubuntu according to this document:
http://supportforums.blackberry.com/t5/Native-Development/Porting-PJSIP-PJMEDIA-and-PJLIB-to-BlackBerry-10/ta-p/2085751
When I am executing this command: ./buildpjsip (it's on number 8 in document), it is showing these errors:
cp: cannot create regular file /x86/lib': No such file or directory
/home/ahsish/bb10-pjsipdemo-master/pjbuildscripts/pjsip-build /home/ahsish/bb10-pjsipdemo-master/pjbuildscripts
/home/ahsish/bb10-pjsipdemo-master/pjbuildscripts/pjsip-build/trunk /home/ahsish/bb10-pjsipdemo-master/pjbuildscripts/pjsip-build /home/ahsish/bb10-pjsipdemo-master/pjbuildscripts
Makefile:1: build.mak: No such file or directory
Makefile:2: build/host-.mak: No such file or directory
make: *** No rule to make target `build/host-.mak'. Stop.
checking build system type... i686-pc-linux-gnu
checking host system type... i486-pc-nto-qnx8.0.0
checking target system type... i486-pc-nto-qnx8.0.0
checking for i486-pc-nto-qnx8.0.0-gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
aconfigure: error: in `/home/ahsish/bb10-pjsipdemo-master/pjbuildscripts/pjsip-build/trunk':
aconfigure: error: C compiler cannot create executables
See `config.log' for more details
Makefile:1: build.mak: No such file or directory
Makefile:2: build/host-.mak: No such file or directory
make: *** No rule to make target `build/host-.mak'. Stop.
Makefile:1: build.mak: No such file or directory
Makefile:2: build/host-.mak: No such file or directory
make: *** No rule to make target `build/host-.mak'. Stop.
/home/ahsish/bb10-pjsipdemo-master/pjbuildscripts/pjsip-build /home/ahsish/bb10-pjsipdemo-master/pjbuildscripts
adding: libopencore-amrwb.a (deflated 67%) adding: libopencore-amrnb.a (deflated 70%)
/home/ahsish/bb10-pjsipdemo-master/pjbuildscripts*
I also encountered the issue before and solved it successfully. I think what results in the issue is that, after you executed the step 4 in the document: Execute bbndk-env.bat or bbndk-env.sh from the root of your installation of the Native SDK. You shouldn't close the command prompt or open a new terminal. I mean you should execute the rest steps in the same terminal, then you will build the library successfully. Also, you had better ensure your gcc is the newest version. Good luck for you.
You could try first:
$ cd bb10-pjsipdemo/pjbuildscripts/pjsip-checkout/trunk
$ ./configure
$ touch pjlib/include/pj/config_site.h
$ make dep
$ make
Reference: http://www.pjsip.org/pjlib/docs/html/pjlib_build_sys_pg.htm
And then run bb10-pjsipdemo/pjbuildscripts/buildpjsip

How to set node path for nodejs (Ubuntu)

I'm trying to setup nodejs to access a postgres database. What I've done so far is the following (https://gist.github.com/579814):
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
then
git clone git://github.com/isaacs/npm.git
make
make install
so far, so good. However, when I try to install the postgres driver
npm install pg
I get the following:
node-waf configure build || true
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.066s)
Waf: Entering directory `/home/christian/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/default/src/binding_1.o
../src/binding.cc:3:25: fatal error: node_events.h: No such file or directory
compilation terminated.
Waf: Leaving directory `/home/christian/node_modules/pg/build'
Build failed: -> task failed (err #1):
{task: cxx binding.cc -> binding_1.o}
I've been looking around for setting the node path, although haven't found anything of help so far - probably also because I'm totally new to nodejs, so I'd be happy about any hint.
Now, you have NodeJS installed in your Ubuntu. You should set /etc/environment and load nodeJS path that can be executed by another users. For example:
NODE="/home/ubuntu/local/node"
NODE_PATH="/usr/local/lib/node_modules"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$NODE/bin:$NODE/lib/node_modules"
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Do this in bash:
echo 'export NODE_PATH=~/local/:~/local/node_modules' >> ~/.bashrc
before things are fixed you must use node 0.5.1 (you can use gitk to revert the tree to this version)
Auteur: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Auteur du commit: Ryan Dahl <ry#tinyclouds.org> 2011-07-19 10:46:38
Parent: 0a3fc1d9c8becc32c63ae736ca2b3719a3d03c5b (Remove StatWatcher's dep on C++ EventEmitter)
Enfant: 061ce7b0ac370c8a5ae93d95ab7da171cbd488f0 (net_uv: Fix simple/test-http-expect-continue.js)
Branche: master, remotes/origin/master
Suit: v0.5.1
Précède: v0.5.2
Finally remove node::EventEmitter
I had the same problem.
The issue was that I was specifying a old version of PG in my package.js
After I removed the old version dependancy I was able to install PG without issue.