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 --production fails because of postinstall #315

Open
olingerc opened this issue Mar 1, 2017 · 2 comments
Open

npm install --production fails because of postinstall #315

olingerc opened this issue Mar 1, 2017 · 2 comments

Comments

@olingerc
Copy link

olingerc commented Mar 1, 2017

Hi,

The postinstall npm run webdriver-update fails on my production system. What does this do? The system works without it. After googling a bit it is related to testing and protractor but since I use the --production flag, these dev packages will not be installed.

best regards,
Christophe

@Foxandxss
Copy link
Member

That updates the tools to run e2e tests. You should not care about that in production.

I will see if I can find an alternative solution for not having to worry about that.

@dannypule
Copy link

"scripts": {
    "postinstall": "node -e \"process.env.NODE_ENV != 'production' && process.exit(1)\" || npm run webdriver-update"
}

This fixed the issue for me by checking to see if the NODE_ENV is not equal to 'production' and if so, it exits. Otherwise in non-production environments it executes the script as per normal.

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

3 participants