Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Installed node does not displays version and my application fails to run #303

Open
st-clair-clarke opened this issue May 2, 2022 · 2 comments
Labels

Comments

@st-clair-clarke
Copy link

Describe the Bug

I installed node js as per instructions. Afterwards, I run the command with the following outputs:

asdf list
nodejs 18.0.0
pnpm 7.0.0

node -version
No version is set for command node Consider adding one of the following versions in your config file at nodejs 18.0.0 Exception: node exited with 126 [tty 5], line 1:

The following is an attempt to run my application:
ng serve -c development

/home/pim/node_modules/.bin/ng: 16: exec: node: not found
 ELIFECYCLE  Command failed.
The terminal process "/usr/bin/bash '-c', 'pnpm run serve:dev'" failed to launch (exit code: 1).

Terminal will be reused by tasks, press any key to close it.

Steps to Reproduce

  1. Install asdf core.
  2. Install node and pnpm dependencies
  3. install nodejs and pnpm

Expected Behaviour

I expected node -version to print the version number: 18.0.0

Actual Behaviour

node -version
No version is set for command node Consider adding one of the following versions in your config file at nodejs 18.0.0 Exception: node exited with 126 [tty 5], line 1:

Environment

OS:
Linux scsc 5.4.0-74-generic asdf-vm/asdf#83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

ASDF VERSION: v0.10.0-77fd510  
ASDF ENVIRONMENT VARIABLES: ASDF_DIR=/home/stclair/.asdf

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master b2d06a7
pnpm                         https://github.com/jonathanmorley/asdf-pnpm.git master 95752a9

asdf plugins affected (if relevant)

nodejs
pnpm

@Stratus3D Stratus3D transferred this issue from asdf-vm/asdf May 12, 2022
@Stratus3D
Copy link
Member

I have moved this issue to the nodejs repo because I do not believe there are any issues with asdf-core contributing to this.

Have you tried running asdf reshim after installing nodejs and npm?

@augustobmoura
Copy link
Member

augustobmoura commented May 12, 2022

asdf list list all available versions, it doesn't show which one is being currently used. Try running asdf current to show which versions are being used

For setting a default global version you need to run asdf global nodejs <version>, so that asdf can fallback to it when not in a directory with a .tool-versions file.

Check if that works for you @st-clair-clarke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants