ncu-test-peer
raw JSON → 1.0.0 verified Sat Apr 25 auth: no javascript
A minimal test package that declares a peer dependency on ncu-test-return-version (v1.x). This package itself has no functional code; it exists solely to validate how package managers (npm, yarn, pnpm) handle peer dependency resolution and version matching during installation. It is part of the npm-check-updates test suite and has no release cadence or production use case.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/ncu-test-peer/index.js not supported. ↓
cause Attempted to use CommonJS require() on an ESM-only package.
fix
Change require() to import or use dynamic import().
error npm ERR! Could not resolve dependency: npm ERR! peer ncu-test-return-version@"1.x" from ncu-test-peer@1.0.0 ↓
cause Peer dependency not installed or version mismatched.
fix
Manually install the correct peer: npm install ncu-test-return-version@"1.x"
Warnings
gotcha Peer dependency 'ncu-test-return-version' must be manually installed; not automatically installed by npm/yarn/pnpm by default. ↓
fix Run npm install ncu-test-return-version@"1.x" alongside this package.
breaking Package is ESM-only; importing via require() throws a runtime error. ↓
fix Use import syntax or set type: module in package.json.
gotcha No README or documentation provided; behavior may be ambiguous. ↓
fix Refer to ncu-test-return-version's README for expected peer interaction.
Install
npm install ncu-test-peer yarn add ncu-test-peer pnpm add ncu-test-peer Imports
- default wrong
const pkg = require('ncu-test-peer')correctimport pkg from 'ncu-test-peer' - name wrong
import { default } from 'ncu-test-peer'correctimport { name } from 'ncu-test-peer' - type wrong
import { PkgInfo } from 'ncu-test-peer'correctimport type { PkgInfo } from 'ncu-test-peer'
Quickstart
// Install peer dependencies manually
npm install ncu-test-peer ncu-test-return-version@"1.x"
// Verify installation
import pkg from 'ncu-test-peer';
console.log(pkg.name); // 'ncu-test-peer'
// Check peer dependency is present
import returnVersion from 'ncu-test-return-version';
console.log(returnVersion()); // '1.0.0' (or compatible version)