resolve-from
npmv5.0.0Resolve the path of a module like `require.resolve()` but from a given path
Not recommended for new projects
No — resolve-from should not be adopted for new projects. Last published 2705 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 2705 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 5.7 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding resolve-from to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=8
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the resolve-from README.
const resolveFrom = require('resolve-from');
// There is a file at `./foo/bar.js`
resolveFrom('foo', './bar');
//=> '/Users/sindresorhus/dev/test/foo/bar.js'resolve-from vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| resolve-fromthis page | 0 | 8 | MIT | 7 years ago |
| resolve-cwd | 0 | 1 | MIT | 1 day ago |
| resolve | 0 | 2 | MIT | 1 day ago |
| import-fresh | 0 | 2 | MIT | 1 day ago |
| import-local | 0 | 2 | MIT | 1 day ago |
| @jridgewell/resolve-uri | 166.3M | 1 | MIT | 1 day ago |
Dependencies
Declared by resolve-from v5.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on resolve-from.
A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3
Resolve the path of a module like `require.resolve()` but from the current working directory
Utility function to load nyc configuration
A Metro config for running React Native projects with the Metro bundler
The Expo CLI
The Babel preset for Expo projects
A library to generate a fingerprint from a React Native project
Get the prebuild config
Relationship graph
Dependencies (left) and dependents (right) of resolve-from.
Frequently installed together
The Expo SDK
Lightweight debugging utility for Node.js and the browser
The semantic version parser used by npm.
TypeScript definitions for node
Generated and versioned meta-package wrapping Metro
TypeScript definitions for debug
A library for interacting with the app.json
A Promise-based interface into processes created by child_process.spawn
A module for reading, writing, and manipulating JSON files
Get and typecast environment variables.
the most correct and second fastest glob implementation in JavaScript
hydrate environment variables from .env files into process.env
Release history
No releases in the last two years, typically about 443 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.0.0latest | 7 years ago | 5.7 KB | MIT |
| 4.0.0 | 9 years ago | — | MIT |
| 3.0.0 | 9 years ago | — | MIT |
| 2.0.0 | 10 years ago | — | MIT |
| 1.0.1 | 11 years ago | — | MIT |
| 1.0.0 | 12 years ago | — | MIT |
Overview
resolve-from is an npm package that resolve the path of a module like `require.resolve()` but from a given path. It has 8 known dependents in the graph. The latest version is 5.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need resolve the path of a module like `require.resolve()` but from a given path and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use resolve-from?
No — resolve-from should not be adopted for new projects. Last published 2705 days ago.
How do I install resolve-from?
Run `npm install resolve-from` to add resolve-from to your npm project.
What license is resolve-from released under?
resolve-from is distributed under the MIT license.
How popular is resolve-from?
npm does not publish download counts. Within PackageGraph's crawl, 8 known packages depend on resolve-from.
Is resolve-from still maintained?
The most recent release of resolve-from (v5.0.0) was published 7 years ago.
Does resolve-from run install scripts?
No. resolve-from does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.