Environment
Ubuntu 20.04 (official Beta Version)
Visual Studio Code 1.44.2, installed via ubuntu-make (umake):
umake ide visual-studio-code
Node 12 via nvm install 12 && nvm alias default 12 && nvm use default
VS Code Extension: jest
Error
Restarting VS Code fails with:
Finished running all tests. Starting watch mode.
/bin/sh: 1: npm: not found
/bin/sh: 1: npm: not found
Starting Jest in Watch mode failed too many times and has been stopped.
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
I want to use nvm and want to avoid workaround like adjusting bashrc or similar.
Did not work:
Add to VS Code settings.json (via Ctrl+Shift+P, "Open Settings Json"):
entry "terminal.integrated.shell.linux": "/bin/bash"
Just had an issue running commands over ssh where the node binary from nvm would not be added to the non-login shell's path so couldn't be used. Can't figure out how to add it there and keep it relative to the installed user to be honest.
Removing nvm and installing apt install nodejs through the default repositories is quick workaround if you need.
Related
So while setting up Apache Age, I ran the command npm run setup and was greeted by the following EBADENGINE warnings.
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'ag-viewer#0.0.1',
npm WARN EBADENGINE required: { node: '^14.16.0' },
npm WARN EBADENGINE current: { node: 'v18.14.1', npm: '9.3.1' }
npm WARN EBADENGINE }
These warnings followed by numerous other warnings of unsupported dependencies.
The warnings say that my Node Version is other than the required one so the obvious solution was to downgrading my node version.
Documentation from the Apache-Age Viewer's Github Repository recommends using Node version - ^14.16.0 i.e., any version greater than or equal to 14.16.0 but less than 15.
First check your current Node Version by typing node -v and I recommend downgrading it if it's not >= 14.16.0 and <15.
Follow this link for help in downgrading node version.
Check your node version again after downgrading and run npm run setup again.
Hopefully, the warnings will be gone!
While one way is to downgrade the node version manually.
Alternatively you can use nvm Node Version Manager (Windows, Mac or Linux)
Then just open a terminal (admin/sudo):
nvm install 14.16.0
nvm use 14.16.0
npm run setup
The error is actually because of the wrong version of the node installed. I also faced the same error when I did the incorrect installation. You can fix it by deleting the nvm and node from your machine and reinstalling the nvm and correct node version. and run npm run setup after the required installation.
Fixing the error:
To fix this error take a look at following steps:
Delete nvm, npm and node and install it all again.
For uninstalling node run following command:
nvm uninstall 14.16.0
The command if executed successfully will return a success message indicating the version of node deleted.
Uninstalled node v13.10.1
Type following command in terminal for the deletion of nvm
#nvm deactivate will remove the path variables
nvm deactivate
#nvm unload will uninstall the nvm
nvm unload
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm
Now the node and nvm is deleted go above and download both of them again and run those commands as well.
npm run setup
npm run start
When you run npm run start, age-viewer will start running on
localhost:3000
You will see a screen like this. Enter the details to start using the age-viewer.
For setting up Apache AGE, you do not need to run the command npm run setup.
This for setting up AGE Viewer.
For setting up AGE: https://github.com/apache/age follow the guidelines.
For setting up AGE Viewer: https://github.com/apache/age-viewer follow the guidelines.
I'm quite new to neovim and mostly use it for simple c++ development. Love the motions and customizability, however I cannot find what I'm doing wrong when trying to install the clang-formatter using Mason plugin.
Using the visual interface provided by Mason I navigate to the 'formatter' section, position my cursor on the clang-formatter option and press I. It starts something but always fails with the same error message:
Mason Error Message
(I get the same error when installing linters)
So far installing LSP's has been no problem, and I've tried to google what the 'Error: name cmd not found' meant but haven't found anything that seems related.
I've made sure to update both my python3 and python3-pip packages. I believe that the virtual environment package became standard since python3.3 so I haven't installed that separately.
':checkhealth mason' output
My Check Health
If anybody has experienced something similar I'd love to hear how you've solved it!
Did you installed pynvim? It is what makes the bridge between neovim and python stuff I guess, it is optional to have it but could fix your issue. My healthcheck looks like this :
provider: health#provider#check
========================================================================
## Clipboard (optional)
- OK: Clipboard tool found: xclip
## Python 3 provider (optional)
- INFO: `g:python3_host_prog` is not set. Searching for python3 in the environment.
- INFO: Multiple python3 executables found. Set `g:python3_host_prog` to avoid surprises.
- INFO: Executable: /usr/bin/python3
- INFO: Other python executable: /bin/python3
- INFO: Python version: 3.8.10
- INFO: pynvim version: 0.4.3
- OK: Latest pynvim is installed.
To install pynvim (in your shell):
pip3 install pynvim
Specs
VSCode 1.63.2
Homebrew 3.3.10
asdf 0.9.0
MacOS Monterey
Problem
I installed asdf via Homebrew as per doc http://asdf-vm.com/guide/getting-started.html#_3-install-asdf
The asdf command works well in my iTerm. However, it didn't work when committing or pushing via VScode terminal and VSCode source control.
The error from VSCode terminal
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
And this below from VSCode source control
The error I got in output.
> git push origin feature/my-branch
Unknown command: `asdf exec npm run pre-commit`
/usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: line 82: /usr/local/opt/asdf/lib/commands/command-help.bash: No such file or directory
Running asdf exec npm run pre-commit in my iTerm works well. There must be different configuration between zsh in iTerm vs in VSCode. 🤔
My attempt so far is to add this configuration in VSCode settings.json
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.defaultProfile.osx": "zsh"
but still not working
My ~/.zshrc setup for asdf
. /usr/local/opt/asdf/libexec/asdf.sh
What is the possible cause here?
Found dubious decision
I also dont have commands folder in asdf/lib
So I copied the same from asdf/libexec/lib
And it worked
I installed the latest version of cmake and was following some instructions i made to integrate a project that used vcpkg with grpc. After installing vcpkg I try to install package with ./vcpkg install grpc which resulted in the error bellow. The instructions worked on a OSX and Ubuntu but I run into issues with raspberry pi.
I have set tried both 0 and 1 like so $VCPKG_FORCE_SYSTEM_BINARIES=1 but neither option is working. Using ./vcpkg result in a VCPKG_FORCE_SYSTEM_BINARIES error:
pi#raspberrypi:~/vcpkg $ ./vcpkg
Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.
pi#raspberrypi:~/vcpkg $ VCPKG_FORCE_SYSTEM_BINARIES=1
pi#raspberrypi:~/vcpkg $ echo $VCPKG_FORCE_SYSTEM_BINARIES
1
pi#raspberrypi:~/vcpkg $ ./vcpkg
Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.
In bash the environment variable is set with export:
export VCPKG_FORCE_SYSTEM_BINARIES=1
./vcpkg install grpc
The export command can be put in .bashrc to persist this setting.
src: https://github.com/microsoft/vcpkg/issues/14140
I'm trying to install NetBeans on Linux Mint, and I'm getting the following error every time I run the installation script:
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...
Can`t initialize UI
Running in headless mode
What should I do to get it working?
In case anyone has this problem in the future, Netbeans doesn't like OpenJDK 6 but -- fortunately -- it works fine with OpenJDK 7 (as expected as for Java 7 OpenJDK is the reference implementation). Just make sure you remove any Java 6 packages before installation attempts. On Ubuntu and Mint one can do:
sudo apt-get purge ^openjdk-6-*
sudo apt-get install openjdk-7-jdk
It should work afterwards.
Looks like Netbeans does not work properly with Openjdk. This is what I did (in Linux Mint 12):
sudo apt-get remove openjdk*
sudo apt-get install sun-java6-jdk
Then you will be able to run the .sh installer as usual.
I hit this same issue on Kubuntu 12.04 LTS but needed Sun JDK 6 for a project I'm maintaining. I stumbled upon Martin Wimpress' OAB-Java script (by way of help.ubuntu.com) which creates and installs a local apt repository for Sun JDK 6. You can find the latest instructions on Martin's github site which run as follows:
cd ~/
wget https://github.com/flexiondotorg/oab-java6/raw/0.2.7/oab-java.sh \
-O oab-java.sh
chmod +x oab-java.sh
sudo ./oab-java.sh
If you want to see what this script is doing while it is running then execute the following from another shell:
tail -f ./oab-java.sh.log
Alternatively, you can clone the OAB-Java repo and kick of the script from within it:
git clone git://github.com/flexiondotorg/oab-java6.git
cd oab-java6
sudo ./oab-java.sh
Either way, once that is in place follow Jose's instructions to remove openjdk and install sun jdk:
sudo apt-get remove openjdk*
sudo apt-get install sun-java6-jdk
One final note, the script accepts a -7 argument which will create and install a local apt repository for Oracle JDK 7 should you want to go that route.
I was able to get it to work by getting into the target system using ssh -X, then making sure DISPLAY was exported. That handles the X server issues.
Change the priority of the Oracle Java executables:
export PATH=/usr/java/latest/bin:$PATH
Run the installer:
./netbeans-8.1-linux.sh
What worked for me was installing default java environment from the terminal:
sudo apt-get install default-jre
The installation was a success - under "user".
The installation failed - under "su" (under Red Hat equivalent of "sudo"). With
Can`t initialize UI
Running in headless mode
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
For me.