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

npm install does not run postinstall #32

Closed
justinbaltazar opened this issue Jan 3, 2021 · 1 comment
Closed

npm install does not run postinstall #32

justinbaltazar opened this issue Jan 3, 2021 · 1 comment

Comments

@justinbaltazar
Copy link

justinbaltazar commented Jan 3, 2021

Describe the bug
npm install does not run postinstall script on some versions of NPM. As a result, grammar.js is not generated and Haraka complains that the file does not exist.

Steps To Reproduce
Run npm install in the root directory of this repo as root on some versions of NPM (mine is 6.14.4).

System Info:

Haraka Haraka.js — Version: 2.8.26
Node v10.19.0
OS Linux mail-production-1 5.4.0-1029-oracle #31-Ubuntu SMP Wed Oct 21 13:50:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
openssl OpenSSL 1.1.1f 31 Mar 2020

NPM version: 6.14.4

Additional Context:
One way that we could resolve this is just by modifying the instructions to have the user manually run npm run postinstall. I'm unsure how we could modify this though to run postinstall scripts when installing Haraka from npm.

@msimerson
Copy link
Member

The postinstall hook is documented in the v6 docs so I expected it to work for every npm v6+. Silly me.

I just tested installing it on ubuntu installed via nodesource and Haraka and all dependencies installed correctly.

Haraka Haraka.js — Version: 2.8.26
Node v10.23.1
OS Linux ubuntu 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
openssl OpenSSL 1.1.1 11 Sep 2018

Since:

- Haraka specifically requires node >= `10.21.0`
- Haraka will soon specifically require >= 10.23.1
- your version of node.js is older than the minimum
- node 10 goes EOL in a few months

I'm not inclined to try very hard to support legacy npm. The solution is for you to update your version of node.js.

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

2 participants