Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem installing version 3.1.1 as a dependency of a package with npm install #35

Open
robbiesz opened this issue Feb 7, 2023 · 1 comment

Comments

@robbiesz
Copy link

robbiesz commented Feb 7, 2023

Hello,

There seems to be a problem with the package manifest in the registry.npmjs.org registry for package vuepress-theme-yuu-3.1.1

The manifest returns these "scripts" for the package:

$ curl https://registry.npmjs.org/vuepress-theme-yuu -s | jq '."versions"."3.1.1"."scripts"'
{
"postinstall": "husky install",
"lint": "eslint . --ext js,vue",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
}
However the package itself has a different set of scripts defined in its package.json file:

$ curl "https://registry.npmjs.org/vuepress-theme-yuu/-/vuepress-theme-yuu-3.1.1.tgz" -s | tar xzO package/package.json | jq '."scripts"'
{
"_postinstall": "husky install",
"lint": "eslint . --ext js,vue",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
}
The problem is the existence of the 'postinstall' script that prevents npm install to install vuepress-theme-yuu-3.1.1 as a dependency. The reason being is that npm tries to run husky install which expects the vuepress-theme-yuu package to be in development mode.

The package.json in the tgz archive has a deactivated (by pinst) key/script _postinstall which should not interfere with npm install.

I used nodejs-16.19.0 and npm-8.5.5 on Windows and Linux.

Can the manifest somehow be refreshed to reflect the actual package.json contents?

Any help would be appreciated.
Thanks!

@robbiesz
Copy link
Author

robbiesz commented Feb 7, 2023

I opened a problem ticket on github.com/npm but so far noone has responded: npm/feedback#865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant