I'm trying to commit a vue.js project on a git repository. I'm sure my .gitignore works, because I already did a checkout without get the node_modules repository. However when I commit, I have synthax errors appearing for my node_modules.
I tried to remove the node_modules repository, but I had a cannot find module error. I tried to correct the error, but the computer find another error.
An example of the error I got :
[user@server mgtsm]$ git commit -m "Ajout des templates de message" /home/user/git/mgtsm/node_modules/yorkie/node_modules/execa/index.js:2 const childProcess = require('child_process'); ^^^^^ SyntaxError: Use of const in strict mode. at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (/home/fs623/git/mgtsm/node_modules/yorkie/src/runner.js:3:15) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10)
pre-commit hook failed (add --no-verify to bypass)
Could you help me please ?