-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
The package can't be installed #256
Comments
Hi @mlomb Can you tell me what version are you trying to install? Edit: I guess I'll look into this |
This is interesting 🤔
|
First of all, i can reproduce the issue on my windows machine Secondly, it's clear(er) what's happening now after a bit of research In my package, i used the Well apparently the metadata on npm's servers and the one contained in my package.json file is different, in theirs the field still has the correct name $ npm view whatsapp-chat-parser@4.0.0 scripts
{
build: 'tsup',
test: 'TZ=UTC vitest run',
'test:watch': 'TZ=UTC vitest watch',
'test:coverage': 'TZ=UTC vitest run --coverage',
lint: 'tsc && eslint .',
format: 'prettier --write .',
'format:staged': 'pretty-quick --staged',
prepack: 'npm run build && pinst --disable',
postpack: 'pinst --enable',
prepublishOnly: 'npm run build && npm t && pinst --disable',
postinstall: 'husky install', # this is supposed to be "_postinstall" just like the published package.json!
postpublish: 'pinst --enable'
} This has been explained much better by this post: https://gist.github.com/djcsdy/2f5a287b3ba16f2a8f0312f45588e6ce Which I found here: To fix this I will have to reevaluate how i run these scripts, and probably there are better ways to do that nowadays. Thanks a lot for bringing this to my attention, I'll try to fix it as soon as possible. |
Hi @mlomb Querying ➜ npm view whatsapp-chat-parser@4.0.0 scripts
{
lint: 'tsc && eslint .',
test: 'TZ=UTC vitest run',
build: 'tsup',
format: 'prettier --write .',
prepack: 'npm run build && pinst --disable',
postpack: 'pinst --enable',
'test:watch': 'TZ=UTC vitest watch',
postinstall: 'husky install',
postpublish: 'pinst --enable',
'format:staged': 'pretty-quick --staged',
'test:coverage': 'TZ=UTC vitest run --coverage',
prepublishOnly: 'npm run build && npm t && pinst --disable'
} Querying ➜ npm view whatsapp-chat-parser@4.0.1 scripts
{
build: 'tsup',
test: 'cross-env TZ=UTC vitest run',
'test:watch': 'cross-env TZ=UTC vitest watch',
'test:coverage': 'cross-env TZ=UTC vitest run --coverage',
lint: 'tsc && eslint .',
format: 'prettier --write .',
prepublishOnly: 'npm run build && npm t'
} How did I solve it? I removed the dependencies from the packages mentioned above and removed some dev scripts. |
Hey, I was debugging some problem (#117) in chat-analytics (which uses whatsapp-chat-parser) and found out the package can't be installed due the postinstall script.
The problem persists when trying to install chat-analytics.
I recommend removing the postinstall script. I usually have those disabled, but forgot to do so in this machine.
😃
The text was updated successfully, but these errors were encountered: