Skip to content

Post-install script not included in the package #26

@lordofthelake

Description

@lordofthelake

The package.json file attempts to call the scripts/postinstall.js script in the post-install phase and, while the file is present in this repository, it's not included in the distributed npm package (missing from the files section of package.json)

Reproduction:

$ npm add -D cli-lsp-client
npm error code 1
npm error path ~/PROJECTFOLDER/node_modules/cli-lsp-client
npm error command failed
npm error command sh -c node scripts/postinstall.js
npm error node:internal/modules/cjs/loader:1372
npm error   throw err;
npm error   ^
npm error
npm error Error: Cannot find module '~/PROJECTFOLDER/node_modules/cli-lsp-client/scripts/postinstall.js'
npm error     at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)
npm error     at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
npm error     at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
npm error     at Module._load (node:internal/modules/cjs/loader:1179:37)
npm error     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
npm error     at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
npm error     at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:152:5)
npm error     at node:internal/main/run_main_module:33:47 {
npm error   code: 'MODULE_NOT_FOUND',
npm error   requireStack: []
npm error }
npm error
npm error Node.js v24.4.1
npm error A complete log of this run can be found in: ~/.npm/_logs/2025-09-29T21_49_22_444Z-debug-0.log

$ npm add -D cli-lsp-client --ignore-scripts

added 153 packages, and audited 990 packages in 3s

230 packages are looking for funding
  run `npm fund` for details

7 vulnerabilities (1 low, 6 moderate)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

$ ls node_modules/cli-lsp-client
cli-lsp-client LICENSE        package.json   README.md      src

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions