{"id":20541522,"url":"https://github.com/cnpm/nodeinstall","last_synced_at":"2025-04-04T11:17:00.036Z","repository":{"id":12003714,"uuid":"67811944","full_name":"cnpm/nodeinstall","owner":"cnpm","description":"Another node installer that bundle node with application.","archived":false,"fork":false,"pushed_at":"2024-11-12T06:02:04.000Z","size":85,"stargazers_count":83,"open_issues_count":1,"forks_count":15,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-28T10:08:51.399Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnpm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-09T15:49:08.000Z","updated_at":"2024-11-12T06:02:06.000Z","dependencies_parsed_at":"2025-01-01T04:08:05.098Z","dependency_job_id":"f470c549-dadb-4e1a-a0fa-3be6eba817b1","html_url":"https://github.com/cnpm/nodeinstall","commit_stats":{"total_commits":26,"total_committers":8,"mean_commits":3.25,"dds":0.6923076923076923,"last_synced_commit":"0106c33efe900d7c73e35df1efb95f447b6faf73"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fnodeinstall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fnodeinstall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fnodeinstall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnpm%2Fnodeinstall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnpm","download_url":"https://codeload.github.com/cnpm/nodeinstall/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166171,"owners_count":20894654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T01:24:09.073Z","updated_at":"2025-04-04T11:17:00.001Z","avatar_url":"https://github.com/cnpm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nodeinstall\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/cnpm/nodeinstall/actions/workflows/nodejs.yml/badge.svg)](https://github.com/cnpm/nodeinstall/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/nodeinstall.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/nodeinstall\n[codecov-image]: https://codecov.io/gh/cnpm/nodeinstall/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/cnpm/nodeinstall\n[download-image]: https://img.shields.io/npm/dm/nodeinstall.svg?style=flat-square\n[download-url]: https://npmjs.org/package/nodeinstall\n\nAnother node installer that bundle node with application.\n\n## Why\n\nNodeinstall is not a node version switcher, it will install node locally(in node_modules). Then you can deploy application everywhere without Node installed.\n\nYou can start application with `npm start` easily, npm will find node from `$PWD/node_modules/.bin/node`\n\nNodeinstall let application use the same node version in every environment(local development for production).\n\n## Installation\n\n```shell\n$ npm install nodeinstall -g\n```\n\n## Feature\n\n- ✔︎ Install Node to Local\n- ✔︎ Support [Alinode] and [NSolid]\n- ✔︎ Support RC and nighly\n- ✔︎ Package Define\n- ✔︎ Ignore Unsafe Versions\n\n## Usage\n\nInstall node to node_modules\n\n```shell\n$ nodeinstall 6.0.0\n$ ./node_modules/.bin/node -v\n```\n\nYou can use semver range to match the real version\n\n```shell\n$ nodeinstall ^6.0.0\n$ ./node_modules/.bin/node -v\n```\n\nYou can also use nodeinstall to install [Alinode] or [NSolid]\n\n```shell\n$ nodeinstall --install-alinode 1.6.0\n$ ./node_modules/.bin/node -p 'process.versions.alinode'\n$ nodeinstall --install-nsolid 1.6.0\n$ ./node_modules/.bin/node -p 'process.versions.nsolid'\n```\n\nYou can define version in package.json\n\n```json\n{\n  \"engines\": {\n    \"install-node\": \"^18.0.0\"\n  }\n}\n```\n\nAlso support\n\n- `install-alinode` for [Alinode]\n- `install-nsolid` for [NSolid]\n- `install-noderc`\n- `install-nightly`\n\n**If you are in China, you can use `--china` flag to speed up.**\n\n## API\n\n```js\nconst install = require('nodeinstall').install;\nawait install({\n  version: '^18.0.0',\n});\n```\n\n### Options\n\n#### cwd\n\nThe current directory, default is `process.cwd`.\n\n#### version\n\nThe version that you want to install, it also can be semver range that get the right version automatically.\n\nVersion matching is based on distUrl.\n\n#### distUrl\n\nThe url where to donwload the tarball, You can find all distUrl in [config.js](https://github.com/cnpm/nodeinstall/blob/master/lib/config.js).\n\n#### china\n\nUse the mirror distUrl in china for speed.\n\n#### cache\n\n#### unsafeVersions\n\nThe Map contains the unsafe version and the safe version.\n\nFor example, if you install 4.0.0 that is defined in unsafeVersions as an unsafe version, it will install 4.5.0 instead.\n\n```\nconst unsafeVersions = {\n  '\u003e= 1.0.0 \u003c 4.4.4': '4.5.0',\n};\n```\n\n#### installNode\n\nInstall Node, it's a default options. Ignore when package define matched..\n\n#### installNoderc\n\nInstall Node RC, ignore when package define matched.\n\n#### installAlinode\n\nInstall Alinode, ignore when package define matched.\n\n#### installNsolid\n\nInstall NSolid, ignore when package define matched.\n\n#### installNightly\n\nInstall Node nightly, always be the latest version, ignore when package define matched.\n\n## Questions \u0026 Suggestions\n\nPlease open an issue [here](https://github.com/eggjs/egg/issues).\n\n## Lisence\n\nMIT\n\u003c!-- GITCONTRIBUTOR_START --\u003e\n\n## Contributors\n\n|[\u003cimg src=\"https://avatars.githubusercontent.com/u/360661?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003epopomore\u003c/b\u003e\u003c/sub\u003e](https://github.com/popomore)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/156269?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003efengmk2\u003c/b\u003e\u003c/sub\u003e](https://github.com/fengmk2)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/4635838?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003egemwuu\u003c/b\u003e\u003c/sub\u003e](https://github.com/gemwuu)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/6339390?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003erichardo2016\u003c/b\u003e\u003c/sub\u003e](https://github.com/richardo2016)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/4013475?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003ebrucewar\u003c/b\u003e\u003c/sub\u003e](https://github.com/brucewar)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/25276032?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003elceric\u003c/b\u003e\u003c/sub\u003e](https://github.com/lceric)\u003cbr/\u003e|\n| :---: | :---: | :---: | :---: | :---: | :---: |\n\n\nThis project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Dec 10 2022 01:18:52 GMT+0800`.\n\n\u003c!-- GITCONTRIBUTOR_END --\u003e\n\n\n[Alinode]: https://www.aliyun.com/product/nodejs\n[NSolid]: https://nodesource.com/products/nsolid/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnpm%2Fnodeinstall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnpm%2Fnodeinstall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnpm%2Fnodeinstall/lists"}