'Portable VS Code + portable Node.js
I am new to learning Node.js and VS Code. I installed portable VS CODE. It works great with other installed programs. But can't set it up to work with portable Node.js One of the ways I did it. Installed Node.js. Copied his folder to a separate drive. Removed installed Node. Launched Node from the copied folder. He works. Setting up VS Code to attach to any Node.js process. I'm trying to run a script to check in VS Code, but I get an error: "Can't find Node.js binary "npm": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json" But there is a section:
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickMatchedProcess}",
"skipFiles": ["<node_internals>/**"]
},
Where the error might be and how to get VS Code portable and Node.js portable to work. Perhaps there is a portable version of Node.js?
Solution 1:[1]
the issues here is, having nodejs portable. it's not recommended at all, it's your runtime environment part. however, if you trying to use portable vscode, it will works just fine, it is the same as, you are using any other portable text editor, such as notepad++. because it is design to be portable. but it's not the same as nodejs, keep in mind that, nodejs is your runtime environment. i advice you to install it to your system, non negotiate. however if you insist, just add your nodejs directory to your system PATH:C:\Program Files\nodejs, and user PATH:C:\Users\USERNAME\AppData\Roaming\npm, see if it work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | lordroy |
