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

Error when package.json not found #66

Open
alleypa opened this issue Jan 26, 2016 · 2 comments
Open

Error when package.json not found #66

alleypa opened this issue Jan 26, 2016 · 2 comments
Labels

Comments

@alleypa
Copy link

alleypa commented Jan 26, 2016

Pre-git breaks the .git hooks because it always require to look for ./node_modules in the root app. However our application as been restructured to enforce MAVEN strict folder structure. Hence we now put all our root files under src/main/webapp/. This causes the pre-git to no longer find installed pre hooks easily because it expects them to be under ./node_modules/.bin/pre-commit for example. Can you please take a look.

@bahmutov
Copy link
Owner

Not sure how to do this then - should it read the node_modules path from the package.json maybe? If that's there. I would be open to you making the code changes and sending me a pull request.

@alleypa
Copy link
Author

alleypa commented Jan 26, 2016

I think it should read the node_modules from the path that 'npm install' put the installed libraries instead of always seeking to find the node_modules folder in the root(./). Our package.json now leaves in /src/main/webapp so also is the node_modules folder. This was based on the forced folder structure needed by Maven. Every other node module plugin installed works fine but just the pre-git hence we've lost the benefit of having our code quality check before pushing to remote git.

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

No branches or pull requests

2 participants