You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The article Safer Node.js coding with git hooks and husky suggest to remove node_modules and do a fresh install of Node.js dependencies after merging a branch. This operation is time consuming and in #580 I decided to skip this step.
I contacted the author of the article for more info and he replied the following:
With post-merge, we're doing a full reinstall of all node modules by first deleting them, because I have seen yarn 1.x often break when deep transitive dependencies change during a merge specifically. I don't know why this happens, exactly. It is also valid to omit this hook, and let developers run "yarn install" manually.
A few weeks ago I tried to skip removing node_modules after merge but encountered an issue: I think that the command yarn or nx was not longer available? I was in the middle of another task so I reverted back.
The goal of this ticket is to try to briefly reproduce the error I encountered or any error that may result from no longer removing node_modules after merge. Upgrading to Yarn 3 or pnpm is also considered but as a parallel solution.
The text was updated successfully, but these errors were encountered:
The article Safer Node.js coding with git hooks and husky suggest to remove
node_modules
and do a fresh install of Node.js dependencies after merging a branch. This operation is time consuming and in #580 I decided to skip this step.I contacted the author of the article for more info and he replied the following:
A few weeks ago I tried to skip removing
node_modules
after merge but encountered an issue: I think that the commandyarn
ornx
was not longer available? I was in the middle of another task so I reverted back.The goal of this ticket is to try to briefly reproduce the error I encountered or any error that may result from no longer removing
node_modules
after merge. Upgrading to Yarn 3 or pnpm is also considered but as a parallel solution.The text was updated successfully, but these errors were encountered: