Giter Club home page Giter Club logo

nodejs-portable's Introduction

For more portable applications, checkout Portapps !

GitHub release Total downloads Build Status Go Report
Become a sponsor Donate Paypal

Read this in other languages: English, 简体中文.

⚠️ Abandoned project

This project is not maintained anymore and is abandoned. Feel free to fork and make your own changes if needed.

Thanks to everyone for their valuable feedback and contributions.

About

A single EXE written in Go to make Node.js portable on Windows systems.
Tested on Windows 7, Windows 8.1 and Windows 10.

Main window of Node.js Portable

Configuration file nodejs-portable.conf is generated at first launch:

Installation

  • Download the latest release.
  • Put nodejs-portable.exe in a new empty folder.

Getting started

Run nodejs-portable.exe, then choose task:

  • 1 to install node.js by entering version and architecture.
  • 2 to launch Node.js shell.

If you have already installed Node.js, create a folder named app and put your node.js environment inside, then launch nodejs-portable.exe. (See #35)

Config file nodejs-portable.conf

  • workPath : Shell working dir (can be relative to nodejs-portable.exe).
  • customPaths : Array of custom paths that will be placed in the PATH environment variable (paths can be relative to nodejs-portable.exe).
  • immediateMode: Set this to true if you want to use node shell immediately.
  • shell: Shell to be used. Can be cmd (default) or powershell.

If an exception happened, take a look into nodejs-portable.log for further information.

Command line

Node.js Portable can be used through the command line to inject arguments directly to node:

$ nodejs-portable.exe --version
v9.5.0

Take a look into nodejs-portable.log if you have any issue.

Building

  • Install Go 1.12+
  • Add Go to your PATH (ex. C:\Go\bin)
  • Install latest version of Mage
  • Add Mage to your PATH
  • Clone this repository
  • Run mage build inside. The artifact will be available in bin

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues.

You can also support this project by becoming a sponsor on GitHub or by making a Paypal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! 🙏

License

MIT. See LICENSE for more details.
USB icon credit to Dakirby309.

nodejs-portable's People

Contributors

crazy-max avatar dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar marascott avatar reinert avatar sami-t avatar ufuchs avatar wenerme avatar xiazeyu avatar zoxon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs-portable's Issues

Super quick start example

Quick batch file to fetch current version of Nodejs-portable and run it.

mkdir new-node
pushd new-node
call Bitsadmin /transfer "default"  ^
   https://raw.githubusercontent.com/crazy-max/nodejs-portable/master/nodejs-portable.bat ^
   %cd%\new-node\nodejs-portable.bat

call nodejs-portable.bat

Windows XP through Win7. Win 8 and newer should use Powershell (http://superuser.com/questions/129269/download-a-file-via-http-from-a-script-in-windows), though our Server 2012 still has it and it works.

Command Line execute NPM code?

I am trying to get command line going, but getting this error. It seems while not in the portable shell, it does not know about the work folder. I am working on automation, so I need a way to kick off a 'npm test' command.

.\nodejs-portable.exe npm test

internal/modules/cjs/loader.js:976
  throw err;
  ^

Error: Cannot find module 'D:\Updates\PupeteerTest\CandP\npm'
	[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:973:15)	[39m
	[90m    at Function.Module._load (internal/modules/cjs/loader.js:855:27)	[39m
	[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)	[39m
	[90m    at internal/main/run_main_module.js:17:47	[39m {
  code: 	[32m'MODULE_NOT_FOUND'	[39m,
  requireStack: []
}

Support pwsh

While PowerShell 5.1 is currently an option, I'd like it to launch using PowerShell 7, which is typically pwsh.exe

x64 platform

Currently the batch file always downloads node.js for the x86 platform.
Platform detection (ex. %processor_architecture%) would be nice. :)

Trojan

My virus scanner sees nodejs-portable.exe as a trojan virus and deletes it automatically.

Option numbers in Readme.

Ho,

You write in your Installation README.md :

Choose task 1 to install or task 2 to launch node.js if it's already installed.

In fact, 1 is to Launch and 2 is to Install ;)

Thanks.

Yassine.

work directory not opened

When I added nodejs-portable to my start menu, launching it from there did not put me in the "work"-folder, but in the location of the cmd.exe.
I fixed the issue by putting
pushd "%~dp0"
right after the "Batch vars" SET-Block.

Portability with DB

It would be great....Node JS made portable with NoSQL DB as well..

Is it possible to bundle both Node JS and Mongo as Portable ???? That would be great

Just for reference: https://github.com/Monglo/MongloDB

  • Portable of Node Js, Mongo to be used in Pen drive
  • Portable of any OS - Windows/Linux/Mac

So that single bundled zip file or folder can be used in any OS

Basically wanted to make the full fledged application as Portable.......

Launch Script Error

When I try to launch the "Shell" command I get the following error:
Error: open \?\C:\Users\username.nodejs-portable\launch.bat: The system cannot find the path specified.

I am guessing this is because I just downloaded the Windows binaries from https://nodejs.org/en/download/current/ and put them in the same folder as the nodejs-portable.exe.
So nodejs was not installed on my computer.
The batch file version of nodejs portable works perfectly fine.

Improve compatibility with Cmder console

Hey there!
As of now I'm using Nodejs portable on a Win 7 64 bit machine, via the Cmder console and is working quite well in "static" mode (just passing .js scripts to the nodejs.exe file). Unfortunately with the Nodejs repl there are a couple of issues with colors and cleared custom prompt, resulting in a bare and bone vanilla cmd.exe shell experience.
I've tried providing the path to cmder.exe as "shell" value in the `nodejs-portable.conf' file without any appreciable results.
Am I missing something obvious?
Thank you for your time and support!

2 advice about custom path in setting

1 none absolute path

First here's my path setting:

{
  "version": "2.1.2",
  "gitPath": "\\_apps\\PortableGit",
  "pythonPath": "\\_apps\\Python27"
}

And here's the actually path:

Your environment has been set up for using Node.js 8.4.0 (ia32) and npm.

I:\_apps\node\work>set path
Path=I:\_apps\node\node_modules\npm;I:\_apps\node;\_apps\Python27;\_apps\PortableGit\cmd;.........

Is there anyway to check or correct the relative path into absolute path?
Like add a drive letter before the custom path when detected.

so the actually path will like I:\_apps\node instead of \_apps\node

by the way, the

npm ERR! code EPERM
npm ERR! errno -4048

problem is confirmed has nothing to do with your launcher, but is the npm's problem.
so it's no use to add npm folder into path
the advice of "add NODE_PATH" in #29 can already let npm found itself.
just use npm cache clean --force or npm cache verify can solve.

2 Advice about greater custom path

how about use

{
  "version": "2.1.2",
  "customPath": "\\_apps\\PortableGit;\\_apps\\Python27"
}

and add them into PATH(maybe cut of into groups first), so that the user will have more option if they want to add their own environment into PATH when use the launcher.
but it may become difficult when use none absolute path. I sew it in the Wordpress's code, found it good, but don't know if it can be realize using golang.

Problem with path with spaces

Hello,

I've installed the script at first in a directory with a space. The install failed with an error stating that the directory wasn't found. If I install in a directory without spaces everything works fine.

Regards.

Open a work file directly

I set immediateMode to true and wanted to pass on "node app.js" to nodejs-portable.exe, but I cant get it to work

how can I manage to start an app directly with an batch file?

Cant download replays, please help

[4:12:09 PM] Ready
[4:12:12 PM] No installed antivirus detected.
[4:12:12 PM] Displaying tree view of 'C:\Users\findu\AppData\Local\Plays' for debugging purposes:
[4:12:12 PM] C:\Users\findu\Desktop\New folder>tree "C:\Users\findu\AppData\Local\Plays" /f
[4:12:12 PM] Folder PATH listing for volume OS
[4:12:12 PM] Volume serial number is 5A5B-76F8
[4:12:12 PM] C:\USERS\FINDU\APPDATA\LOCAL\PLAYS
[4:12:12 PM] ³ Plays.exe
[4:12:12 PM] ³ SquirrelSetup.log
[4:12:12 PM] ³ Update.exe
[4:12:12 PM] ³
[4:12:12 PM] ÃÄÄÄapp-3.0.0
[4:12:12 PM] ³ ³ chrome_100_percent.pak
[4:12:12 PM] ³ ³ chrome_200_percent.pak
[4:12:12 PM] ³ ³ d3dcompiler_47.dll
[4:12:12 PM] ³ ³ ffmpeg.dll
[4:12:12 PM] ³ ³ icudtl.dat
[4:12:12 PM] ³ ³ libEGL.dll
[4:12:12 PM] ³ ³ libGLESv2.dll
[4:12:12 PM] ³ ³ LICENSE
[4:12:12 PM] ³ ³ natives_blob.bin
[4:12:12 PM] ³ ³ osmesa.dll
[4:12:12 PM] ³ ³ Plays.exe
[4:12:12 PM] ³ ³ resources.pak
[4:12:12 PM] ³ ³ snapshot_blob.bin
[4:12:12 PM] ³ ³ squirrel.exe
[4:12:12 PM] ³ ³ SquirrelSetup.log
[4:12:12 PM] ³ ³ v8_context_snapshot.bin
[4:12:12 PM] ³ ³ VkICD_mock_icd.dll
[4:12:12 PM] ³ ³ VkLayer_core_validation.dll
[4:12:12 PM] ³ ³ VkLayer_object_tracker.dll
[4:12:12 PM] ³ ³ VkLayer_parameter_validation.dll
[4:12:12 PM] ³ ³ VkLayer_threading.dll
[4:12:12 PM] ³ ³ VkLayer_unique_objects.dll
[4:12:12 PM] ³ ³
[4:12:12 PM] ³ ÃÄÄÄlocales
[4:12:12 PM] ³ ³ am.pak
[4:12:12 PM] ³ ³ ar.pak
[4:12:12 PM] ³ ³ bg.pak
[4:12:12 PM] ³ ³ bn.pak
[4:12:12 PM] ³ ³ ca.pak
[4:12:12 PM] ³ ³ cs.pak
[4:12:12 PM] ³ ³ da.pak
[4:12:12 PM] ³ ³ de.pak
[4:12:12 PM] ³ ³ el.pak
[4:12:12 PM] ³ ³ en-GB.pak
[4:12:12 PM] ³ ³ en-US.pak
[4:12:12 PM] ³ ³ es-419.pak
[4:12:12 PM] ³ ³ es.pak
[4:12:12 PM] ³ ³ et.pak
[4:12:12 PM] ³ ³ fa.pak
[4:12:12 PM] ³ ³ fi.pak
[4:12:12 PM] ³ ³ fil.pak
[4:12:12 PM] ³ ³ fr.pak
[4:12:12 PM] ³ ³ gu.pak
[4:12:12 PM] ³ ³ he.pak
[4:12:12 PM] ³ ³ hi.pak
[4:12:12 PM] ³ ³ hr.pak
[4:12:12 PM] ³ ³ hu.pak
[4:12:12 PM] ³ ³ id.pak
[4:12:12 PM] ³ ³ it.pak
[4:12:12 PM] ³ ³ ja.pak
[4:12:12 PM] ³ ³ kn.pak
[4:12:12 PM] ³ ³ ko.pak
[4:12:12 PM] ³ ³ lt.pak
[4:12:12 PM] ³ ³ lv.pak
[4:12:12 PM] ³ ³ ml.pak
[4:12:12 PM] ³ ³ mr.pak
[4:12:12 PM] ³ ³ ms.pak
[4:12:12 PM] ³ ³ nb.pak
[4:12:12 PM] ³ ³ nl.pak
[4:12:12 PM] ³ ³ pl.pak
[4:12:12 PM] ³ ³ pt-BR.pak
[4:12:12 PM] ³ ³ pt-PT.pak
[4:12:12 PM] ³ ³ ro.pak
[4:12:12 PM] ³ ³ ru.pak
[4:12:12 PM] ³ ³ sk.pak
[4:12:12 PM] ³ ³ sl.pak
[4:12:12 PM] ³ ³ sr.pak
[4:12:12 PM] ³ ³ sv.pak
[4:12:12 PM] ³ ³ sw.pak
[4:12:12 PM] ³ ³ ta.pak
[4:12:12 PM] ³ ³ te.pak
[4:12:12 PM] ³ ³ th.pak
[4:12:12 PM] ³ ³ tr.pak
[4:12:12 PM] ³ ³ uk.pak
[4:12:12 PM] ³ ³ vi.pak
[4:12:12 PM] ³ ³ zh-CN.pak
[4:12:12 PM] ³ ³ zh-TW.pak
[4:12:12 PM] ³ ³
[4:12:12 PM] ³ ÀÄÄÄresources
[4:12:12 PM] ³ ³ app.asar
[4:12:12 PM] ³ ³ electron.asar
[4:12:12 PM] ³ ³
[4:12:12 PM] ³ ÀÄÄÄapp.asar.unpacked
[4:12:12 PM] ³ ÀÄÄÄnode_modules
[4:12:12 PM] ³ ÃÄÄÄ7zip
[4:12:12 PM] ³ ³ ÀÄÄÄ7zip-lite
[4:12:12 PM] ³ ³ 7-zip.dll
[4:12:12 PM] ³ ³ 7-zip32.dll
[4:12:12 PM] ³ ³ 7z.dll
[4:12:12 PM] ³ ³ 7z.exe
[4:12:12 PM] ³ ³
[4:12:12 PM] ³ ÃÄÄÄps-list
[4:12:12 PM] ³ ³ fastlist.exe
[4:12:12 PM] ³ ³
[4:12:12 PM] ³ ÀÄÄÄspawn-rx
[4:12:12 PM] ³ ÀÄÄÄvendor
[4:12:12 PM] ³ ÀÄÄÄjobber
[4:12:12 PM] ³ Jobber.exe
[4:12:12 PM] ³
[4:12:12 PM] ÀÄÄÄpackages
[4:12:12 PM] ³ .betaId
[4:12:12 PM] ³ Plays-3.0.0-full.nupkg
[4:12:12 PM] ³ RELEASES
[4:12:12 PM] ³
[4:12:12 PM] ÀÄÄÄSquirrelTemp
[4:12:12 PM] C:\Users\findu\Desktop\New folder>nodejs-portable.exe
[4:12:12 PM] Node.js Portable 2.9.0
[4:12:12 PM] https://github.com/crazy-max/nodejs-portable
[4:12:12 PM] # Menu
[4:12:12 PM] 1 - Install
[4:12:12 PM] 2 - Shell
[4:12:12 PM] * Type 'exit' to leave Node.js Portable
[4:12:16 PM] 'menu' for help> Error: Unknown command 'rd'

NPM Install E500

When I try to install any package with npm install It gets stuck on:
rollbackFailedOptional

After a while it throws out this:

D:\Git>npm install --save node-notifier
npm ERR! code E500
npm ERR! 500 Internal Server Error: node-notifier@latest
npm ERR! A complete log of this run can be found in:
npm ERR! D:\Compilers\Nodejs\cache_logs\2018-06-22T03_06_25_231Z-debug.log

Here is the current nodejs-portable.conf:

{
"version": "2.4.0",
"immediateMode": false,
"workPath": "./work",
"customPaths": [
"C:/Program Files/Git/cmd",
"D:/Compilers/Nodejs/app",
"D:/Compilers/Nodejs/app/node_modules/npm/bin"
]
}

Here is a cat of 2018-06-22T03_06_25_231Z-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'D:\Compilers\Nodejs\app\node.exe',
1 verbose cli 'D:\Compilers\Nodejs\app\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli 'node-notifier' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session a2702e4bdff176b0
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 500 https://registry.npmjs.org/node-notifier 70915ms attempt #3
8 silly fetchPackageMetaData error for node-notifier@latest 500 Internal Server Error: node-notifier@latest
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 71133ms
11 verbose stack Error: 500 Internal Server Error: node-notifier@latest
11 verbose stack at fetch.then.res (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
11 verbose stack at tryCatcher (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
11 verbose stack at Promise._settlePromiseFromHandler (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
11 verbose stack at Promise._settlePromise (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
11 verbose stack at Promise._settlePromise0 (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
11 verbose stack at Promise._settlePromises (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
11 verbose stack at Async._drainQueue (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
11 verbose stack at Async._drainQueues (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
11 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (D:\Compilers\Nodejs\app\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
11 verbose stack at runCallback (timers.js:696:18)
11 verbose stack at tryOnImmediate (timers.js:667:5)
11 verbose stack at processImmediate (timers.js:649:5)
12 verbose cwd D:\Git
13 verbose Windows_NT 10.0.17134
14 verbose argv "D:\Compilers\Nodejs\app\node.exe" "D:\Compilers\Nodejs\app\node_modules\npm\bin\npm-cli.js" "install" "--save" "node-notifier"
15 verbose node v10.5.0
16 verbose npm v6.1.0
17 error code E500
18 error 500 Internal Server Error: node-notifier@latest
19 verbose exit [ 1, true ]

Tried it with the firewall disabled.
Running Windows 10 x64.

Location of package installations

Loving this application! And i just started playing with it but I really like the idea of running this off my flash drive and having a mobile NodeJS development environment. Thank you very much!

However, I am having some issues. Where are packages installed? I am trying to install pnpm but ended up having to use yarn instead of npm. npm kept getting hung up on trying to delete a file that was not found. Weird.

With yarn, when I install pnpm I do get a "successful" message but after that not only can I just run pnpm, since said command is not found, but also I've no idea where it is that pnpm was allegedly succesfully installed to? Please help me.

Thank you @crazy-max! =)

Proxy authentication

Hello I've used the script to install nodejs at work and I encountered the following error
WinHttp.WinHttpRequest: The operation timed out

I've solved the problem by myself by adding a proxy authentication to the VBS script
ECHO dim http: set http = createobject("WinHttp.WinHttpRequest.5.1") >>%nodejsInstallVbs%
ECHO http.SetProxy "2","proxy:8080" >>%nodejsInstallVbs%
ECHO dim bStrm: set bStrm = createobject("Adodb.Stream") >>%nodejsInstallVbs%
:: Open in asynchronous mode.
ECHO http.Open "GET", "%nodejsUrl%", True >>%nodejsInstallVbs%
ECHO http.SetCredentials "domain\user","password","1" >>%nodejsInstallVbs%

It would be nice if this feature could be added by default

"\Git\cmd" syntax error on launch

Installation went fine but I received a syntax error on trying to launch nodejs:

"\Git\cmd" kann syntaktisch an dieser Stelle nicht verarbeitet werden.

crash when invalid characters in PATH variable

Some programs (e.g. some AMD drivers) put brackets or other symbols in the PATH variable.
In line 171 the path variable gets interpreted and if it contains batch syntax symbols, nodejs-portable crashes.
I circumvented this by putting the value of that SET command in apostrophes:
SET "PATH=%PATH%;%GIT%cmd".

[Feature Request]Able to launch with PowerShell instead cmd

Concept:
Add a attribute in nodejs-portable.conf, e.g.

{
  "version": "2.4.0",
  "terminal": "powershell",
  "immediateMode": false,
  "workPath": "./work",
  "customPaths": [
    "C:/Program Files (x86)/Git/cmd",
    "D:/another_path",
    "../a_relative_path"
  ]
}

if terminal set to powershell, using powershell while launching, and default set to cmd.

Add support for Windows 7

If you try to use NodeJS on Windows 7, it advise you that your system could be not supported and say you to change a system variable... so, this is the problem: if you change the system variable, it doesn't work for Node... probably because it works within the portable version, not without.

Please, resolve this bug, because I want use Node Portable, but now I can't...

Support for Portable Python

There is some node modules that requires python to install, so it would be nice to add this functionality.

Enchance of better node version management using nvm-windows.

I found that lots of people are using nvm-windows:
https://github.com/coreybutler/nvm-windows
http://www.jianshu.com/p/28bca6529150

This software is a better node nersion manager, with lots of great features like multiple version installing and quick switching, better updating, and built-in network proxy.

Maybe we can use this for better downloading, but I havn't done deep research into it, so I just put the issue here, and in the spare time, I will try to apply it.

How to set a proxy ?

Hi,

It looks like you added a proxy feature, however you don't explain how to use it... Any direction ? Right now I'm not able to access to it due to proxy issue.

Thanks

Implement Microsoft compiler

Thanks for doing this...

  1. will we be moving to more recent versions of NodeJS or x64?
  2. is there a way we can get support for modules, like jdbc, that require a Microsoft compiler? If i had access to a microsoft compiler I'd have admin access and wouldn't have to put nodejs on a portable drive!

Setting custom workspace path

Could you implement the possibility of setting a custom workspace folder?
I personally would like to have my work folder somewhere else than inside the nodejs folder.

batch file in user directory

I just noticed that when launching nodejs portable, a Folder named ".nodejs-portable" gets created in the user directory, containing a "launch.bat" file. This file persists even after exiting nodejs portable.
Is it possible to not create that folder + file in the user folder, but instead in the nodejs portable folder itself?

Rewrite In PowerShell

the code can be simplified and less crufty if you rewrite it in powershell. If you need help let me know.

All Hail PowerShell, BATCH is Dead

Backslash path?

Hello. When I run "npm run dev", I get an error:

..\app\node_modules\npm\npmrc: The system cannot find the path specified.

Is this because npm is using a backslash path instead of forward slash? I'm doing it in a Git bash window.

I also tested the command in a Windows cmd shell, but I got identical error.

Feature request - Proxy

Hi,

Thanks for the script. However, i was unable to use it because i sit behind a proxy. I cloned your repo locally and made the improvement (to the bat and readme.md). If you grant me write access to the project i can upload my changes. Otherwise, i can paste it here.

Cheers

Version without registry editing?

It would be nice to have a version of nodejs-portable that doesn't edit the registry, only then would it be truly portable. 😉

# Node.js Portable v1.9

 1 - Launch
 2 - Install
 9 - Exit

Choose a task:1

ERROR: Registry editing has been disabled by your administrator.
'"C:\Users\Piedmont\Downloads\nodevars.bat"' is not recognized as an internal or external command, operable program or batch file.

The command prompt has been disabled by your administrator.

Press any key to continue . . .

Error after installing: Registry key not found

After installing NodeJS with this batch and the correct settings on line 32 of the batch I get the following error message in the console if I launch 1 Launch:

ERROR: The specified registry key or value was not found.
Your environment has been set up for using Node.js 0.10.29 (x64) and npm.

2 problems and 2 questions

1. Error on compiling the program using go.

D:\git\nodejs-portable>go get github.com/crazy-max/nodejs-portable/app/util
# github.com/crazy-max/nodejs-portable/app/util
C:\Users\xiaze\go\src\github.com\crazy-max\nodejs-portable\app\util\util.go:26:29: not enough arguments in call to grab.NewRequest
        have (string)
        want (string, string)
C:\Users\xiaze\go\src\github.com\crazy-max\nodejs-portable\app\util\util.go:32:30: grab.DefaultClient.DoAsync undefined (type *grab.Client has no field or method DoAsync)

have a check, plz. To fix it I have temporarily deleted the whole downloading function, to make it work.

2. Lack of NODE_PATH environment

Because lack of NODE_PATH, some of the plugins cannot work properly. So I wrote a new code in main.go funciton shell()

// NEW!!! SET NODE_PATH=%nodejsPath%\node_modules
util.Print("SETTING NODE_PATH... ")
if err := os.Setenv("NODE_PATH",  pathu.CurrentPath + "\\node_modules"); err != nil {
	util.PrintError(err)
}
util.PrintOk()

Hope you will add it in your application.

3. Thoughts about the Git Path.

Because the program is designed for portable use, the git may just in the other path in a USB drive, and the path of git is not added in the PATH. so, I recommend to let the user set the path manually, or add an optional git folder in the direction of the Portable Node.js. That will be more useful for USB device.

4. About compile

What command or how you used to compile the project?

I just use

go get (all packages)
go build main.go

but it don't have an icon, and it is very large than yours, even if I deleted the whole download() funciton.

Please let me know these if you can, thank you.

Here's my forked repo, have a look if you want.
https://github.com/xiazeyu/nodejs-portable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.