Fail to initialize IBM Blockchain Platform on VS Code - visual-studio-code

Failed to activate extension: Failed to execute command "npm" with arguments "rebuild, grpc, --target=7.1.11, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1
Could not rebuild native dependencies Failed to execute command "npm" with arguments "rebuild, grpc, --target=7.1.11, --runtime=electron, --update-binary, --fallback-to-build, --target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1. Please ensure that you have node and npm installed
PS C:\Users\k> code --version
1.44.2
PS C:\Users\k> node --version
v10.20.1
PS C:\Users\k> npm --version
6.14.4
I've installed all the dependencies and for some reason VS Code is failing to initialize.

Related

VUE 3 - weird failure in VS Code and flawless running in console

Windows 10 x64 21H2, running my project in VS Code and get the following error:
Executing task: npm run serve
> weatherApp#0.1.0 serve
> vue-cli-service serve
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
INFO Starting development server...
10% building 2/5 modules 3 active ...babel-loader\lib\index.js!C:\tmp\VUE Weather apps\VUE 3 - weather\node_modules\eslint-loader\index.js??ref--13-0!C:\tmp\VUE Weather apps\VUE 3 - weather\src\main.jsError: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (C:\tmp\VUE Weather apps\VUE 3 -
...
{
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v18.12.1
* The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run serve" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
At the same time the command npm run serve runs w/o any issues. What should I do to have the issue fixed?

How to setup tRPC project with pnpm

I am trying to learn from this repo.
Step 3 of the setup instructions says to run yarn dx.
The package.json for this repo defines that script as:
"dx": "run-p dx:* --print-label",
When I try to do this, I get an error message that says:
yarn dx yarn run v1.22.19 $ run-p dx:* --print-label [dx:next
] $ run-s migrate-sqlite generate-sqlite db-seed && next dev
[dx:prisma-studio] $ pnpm prisma-studio-sqlite [dx:prisma-studio]
/bin/sh: pnpm: command not found [dx:prisma-studio] error Command
failed with exit code 127. [dx:prisma-studio] info Visit
https://yarnpkg.com/en/docs/cli/run for documentation about this
command. ERROR: "dx:prisma-studio" exited with 127. error Command
failed with exit code 1.
I'm not sure what pnpm means, or why prisma is trying to link to sqlite when the db it specifies is psql.
Can anyone point me in the direction of what's required to get this repo to start?
If you use yarn, change any occurrence in the package.json from pnpm to yarn and I think it should work :)

How to fix "pytest: error: unrecognized arguments: -n"

Hi I am trying to run my tests parallely(pytest-xdist) on the azure pipelines.
Till now the tests were running perfectly fine.
Suddenly the pytest is throwing a weird error saying "unrecognized argument".
The file name : integration_test.py
Command used : pytest -n 5 --tb=short integration_test.py -v -s --> to run 5 tests parallely
Total number of tests : 57
Versions :
pytest==6.2.5
pytest-xdist==2.3.0
Even tried with the latest versions of these 2 modules.
Error :
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: -n integration_test.py
How can I overcome this error?
This error is what you encountered:
As hoefling mentioned, the solution is to install the pytest-xdist:
pip install pytest-xdist
On MacOS just running pytest might be ran by a different Python's version than you thought.
$ pytest
============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.9.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
rootdir: [REDACTED]
plugins: anyio-3.5.0, cov-3.0.0
While
$ python3 -m pytest
============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.10.6, pytest-7.1.2, pluggy-1.0.0
rootdir: [REDACTED]
plugins: xdist-2.5.0, forked-1.4.0, pylama-8.4.1
Be careful, and launch it as a module :)

Command failed with exit code 2 in ionic

I HAVE THIS ERROR
On build app in ionic
sudo ionic build android
Error: ANDROID_HOME is not set and "android" command not in your PATH.
You must fulfill at least one of these conditions.
at /home/sbh/testt/mobilebra/platforms/android/cordova/lib/check_reqs.js:206:19
at _fulfilled (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:760:13)
at /home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:821:14
at flush (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:422:7)
Error: /home/sbh/testt/mobilebra/platforms/android/cordova/build:
Command failed with exit code 2
Do the following:
(nano is my preference, use whatever your heart desires)
sudo nano ~/.bashrc
add the following lines, modifying the paths if your SDKs in a different spot:
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Issue with building a haskell-stack postgresql project

I'm trying to use stack to set up the yesod-postgres template project on my Windows machine. Unfortunately, when I run stack build I get the following result:
pg-project-0.0.0: build
Preprocessing library pg-project-0.0.0...
In-place registering pg-project-0.0.0...
Preprocessing executable 'pg-project' for pg-project-0.0.0...
Linking .stack-work\dist\95439361\build\pg-project\pg-project.exe ...
C:/Users/Rik/AppData/Local/Programs/stack/i386-windows/ghc-7.10.3/mingw/bin/ld.exe: cannot find -lpq
collect2.exe: error: ld returned 1 exit status
-- While building package pg-project-0.0.0 using:
C:\stack_root\setup-exe-cache\i386-windows\setup-Simple-Cabal-1.22.5.0-ghc-7.10.3.exe --builddir=.stack-work\dist\95439361 build lib:pg-project exe:pg-project --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
I've added C:\PostgreSQL\bin to my PATH, and I'm using the 32-bit version of PostgreSQL 9.5.
Any help is appreciated.