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

Trying to run javascripting #351

Open
Dnalab01 opened this issue Jan 21, 2023 · 3 comments
Open

Trying to run javascripting #351

Dnalab01 opened this issue Jan 21, 2023 · 3 comments

Comments

@Dnalab01
Copy link

Dnalab01 commented Jan 21, 2023

Describe the bug

Hi, I'm a newbie and it's my first time trying Javascripting.

I followed the instructions and after installing node.js, I opened CMD as administrator, on Windows 11.
I ran the command npm install -g javascripting, and next i wrote javascripting, but nothing happens.
Just an error: "javascripting" is not recognized as an internal or external command,
an executable program or batch file.

To Reproduce
Steps to reproduce the behavior:

  1. Install node.js'
  2. Open Comand Prompt on Windows 11 as Administrator
  3. i see that in my prompt: C:\Windows\System32>
  4. Type: npm install -g javascripting
  5. wait npm finish installation, installation is ok
  6. Type: javascripting (something like that: C:\Windows\System32>javascripting)
  7. error

Expected behavior
Through the tutorials and videos I've watched, the javascripting program launches on the CMD.

So I did this

The npm install had no error, but I couldn't read the installation directory (too fast). I tried to figure out in which directory npm was actually installing javascripting. After some tries, I found javascripting in this directory:

C:\Windows\System32\node_modules\.bin
From here, you can also double click on javascripting.cmd.

I wrote this in command prompt

cd node_modules

C:\Windows\System32\node_modules>

cd .bin

C:\Windows\System32\node_modules\.bin>

javascripting

javascripting starts It works!

Execution environment (please complete the following information):

  • OS: Windows 11
  • Version 22621.1105
  • Node Version v19.4.0
  • NPM 9.3.1

What did I do wrong? Why doesn't javascripting start in my case like in the tutorials I've seen online?

Thanks

@aashmanVerma
Copy link

aashmanVerma commented Apr 7, 2023

@Dnalab01
I guess you have to set enviroment variables in order to set the path so that command can be available outside the folder

@ledsun
Copy link
Collaborator

ledsun commented Apr 10, 2023

If possible, I suggest using Windows Subsystem for Linux.

@dhanmeetsingh
Copy link

The issue seems to be caused by a missing environment variable that points to the directory where npm installs global packages. This variable is typically named "PATH" and should include the path to the ".bin" directory of the npm global package installation.

When you run the "npm install -g" command, it installs the package globally on your system. However, if the PATH environment variable is not set correctly, your command prompt may not be able to find the executable files of the globally installed packages.

In your case, since you were unable to launch the "javascripting" command from the command prompt, it appears that the ".bin" directory of the npm global package installation was not included in the PATH environment variable.

To fix this issue, you can add the path to the ".bin" directory of the npm global package installation to your system's PATH environment variable. You can do this by running the following command in your command prompt:

setx PATH "%PATH%;C:\Windows\System32\node_modules\.bin"
This command adds the path to the ".bin" directory of the npm global package installation to the existing PATH environment variable. After running this command, you should be able to launch the "javascripting" command from the command prompt without any issues.

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

No branches or pull requests

4 participants