endel / increase-memory-limit

Increase memory limit for local node binaries ("max-old-space-size")
http://npmjs.com/package/increase-memory-limit
MIT License
267 stars 26 forks source link

After running cross-env LIMIT=4096 increase-memory-limit run-node package errors #23

Closed dKab closed 5 years ago

dKab commented 5 years ago

After I run cross-env LIMIT=4096 increase-memory-limit I am no longer able to do git commit. This is because I use husky for git -hooks and apparently it uses run-node package. This package gets damaged by cross-env LIMIT=4096 increase-memory-limit and stops functioning. I'm forced to rm -rf node_modules to be able to commit again.

Here's the error that it gives me:

node_modules/run-node/run-node: line 26: syntax error near unexpected token (' node_modules/run-node/run-node: line 26:has_node --max-old-space-size=4096() {'

ashinga48 commented 5 years ago

Same here any fix @dKab

dKab commented 5 years ago

@ashinga48 nope, sorry, I don't know how to fix this.

bartolkaruza commented 5 years ago

Try running from the PR to workaround this until merged/release.

endel commented 5 years ago

@bartolkaruza's PR is now avaialble on increase-memory-limit@1.0.7! 🎉

dKab commented 5 years ago

After upgrading to 1.0.7 I have new error - of the same type, but with different package. This time it's lint-staged package that gets broken.

husky > pre-commit (node v10.13.0)

/node_modules/lint-staged/index.js:9 node --max-old-space-size=4096: '>=8.6.0' ^^

SyntaxError: Unexpected token --

Should we reopen this one or create new?