{"id":18594,"library":"ncu-test-peer","title":"ncu-test-peer","description":"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.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install ncu-test-peer","lang":"bash","label":"npm"},{"cmd":"yarn add ncu-test-peer","lang":"bash","label":"yarn"},{"cmd":"pnpm add ncu-test-peer","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required at runtime by design; installation will warn or fail if missing","package":"ncu-test-return-version","optional":false}],"imports":[{"note":"ESM-only package; no CommonJS export is provided","wrong":"const pkg = require('ncu-test-peer')","symbol":"default","correct":"import pkg from 'ncu-test-peer'"},{"note":"Named export 'name' is available, but default import is more common","wrong":"import { default } from 'ncu-test-peer'","symbol":"name","correct":"import { name } from 'ncu-test-peer'"},{"note":"Type import only; PkgInfo is not a value","wrong":"import { PkgInfo } from 'ncu-test-peer'","symbol":"type","correct":"import type { PkgInfo } from 'ncu-test-peer'"}],"quickstart":{"code":"// Install peer dependencies manually\nnpm install ncu-test-peer ncu-test-return-version@\"1.x\"\n\n// Verify installation\nimport pkg from 'ncu-test-peer';\nconsole.log(pkg.name); // 'ncu-test-peer'\n\n// Check peer dependency is present\nimport returnVersion from 'ncu-test-return-version';\nconsole.log(returnVersion()); // '1.0.0' (or compatible version)","lang":"javascript","description":"Shows how to install and use the package with its required peer dependency, and verify the expected behavior."},"warnings":[{"fix":"Run npm install ncu-test-return-version@\"1.x\" alongside this package.","message":"Peer dependency 'ncu-test-return-version' must be manually installed; not automatically installed by npm/yarn/pnpm by default.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use import syntax or set type: module in package.json.","message":"Package is ESM-only; importing via require() throws a runtime error.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Refer to ncu-test-return-version's README for expected peer interaction.","message":"No README or documentation provided; behavior may be ambiguous.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Change require() to import or use dynamic import().","cause":"Attempted to use CommonJS require() on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/ncu-test-peer/index.js not supported."},{"fix":"Manually install the correct peer: npm install ncu-test-return-version@\"1.x\"","cause":"Peer dependency not installed or version mismatched.","error":"npm ERR! Could not resolve dependency: npm ERR! peer ncu-test-return-version@\"1.x\" from ncu-test-peer@1.0.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}