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

husky package post install hook fails on windows #690

Closed
naingaungphyo opened this issue Mar 17, 2020 · 4 comments
Closed

husky package post install hook fails on windows #690

naingaungphyo opened this issue Mar 17, 2020 · 4 comments

Comments

@naingaungphyo
Copy link

I'm reopening this old issue because I got this identical error.

opencollective-postinstall || exit 0
The token '||' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine

As I mentioned in the old issue, the core-js postinstall script is also changed from

|| operator

to this error catch code.

"postinstall": "node -e "try{require('./postinstall')}catch(e){}""

you can reference this core-js issue to know why the above changes is needed.

@naingaungphyo
Copy link
Author

naingaungphyo commented Mar 19, 2020

The above error is due to npm script-shell config setting being set as powershell.exe.
The workaround is to change npm script-shell config to default setting null.

npm config set script-shell null

@mikr13
Copy link

mikr13 commented May 8, 2020

@typicode Please remove opencollective based on Windows environment

@typicode
Copy link
Owner

typicode commented Apr 3, 2021

postinstall has been removed, it should be good now.

@typicode typicode closed this as completed Apr 3, 2021
@typicode
Copy link
Owner

typicode commented Apr 3, 2021

Sorry for the issue on Windows.

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