resolve-from
npmv5.0.0Resolve the path of a module like `require.resolve()` but from a given path
Overview
resolve-from is an npm package that resolve the path of a module like `require.resolve()` but from a given path. It is extremely widely used, with about 207.1M downloads per week and 2 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 battle-tested, widely-adopted 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
- Large, well-established user base (207.1M weekly downloads).
- 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.
Relationship graph
Dependencies (left) and dependents (right) of resolve-from.
Dependencies
Dev (3)
Used by
Popular packages that depend on resolve-from.
Alternatives to resolve-from
Resolve the path of a module like `require.resolve()` but from the current working directory
Let a globally installed package use a locally installed version of itself if available
Tomorrow's ECMAScript modules today!
Find a file or directory by walking up parent directories
Find the root directory of a Node.js project or npm package
Prepare a node environment to require files with different extensions.
Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`
Convert Windows backslash paths to slash paths
Support for `import <defer|source>` phase syntax in Acorn
Get paths for storing things like data, config, cache, etc
A drop-in replacement for fs, making various improvements.
Extract the non-magic parent path from a glob string.
Frequently installed together
The semantic version parser used by npm.
Lightweight debugging utility for Node.js and the browser
the complete solution for node.js command-line programs
A tiny (183B to 210B) and fast utility to ascend parent directories
Lodash modular utilities.
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
🌈Easily set your terminal text color & styles.
Determine the `package.json#type` which applies to a location
Functions for dealing with a PostgreSQL connection string
PostgreSQL client - pure javascript & libpq with the same API
Prepare a node environment to require files with different extensions.
Version history
| Version | Published | License |
|---|---|---|
| 5.0.0latest | 7 years ago | MIT |
| 4.0.0 | 8 years ago | MIT |
| 3.0.0 | 9 years ago | MIT |
| 2.0.0 | 10 years ago | MIT |
| 1.0.1 | 10 years ago | MIT |
| 1.0.0 | 12 years ago | MIT |
Maintainers
Frequently asked questions
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?
resolve-from has approximately 207,145,729 downloads per week and 2 known dependent packages.