1. bash: husky: command not found
确认项目nodemoudles/.bin文件中有husky程序,并将nodemoudles/.bin添加到环境变量。
export PATH="$PATH:./node_modules/.bin"
2. require() of ES Module /Users/qiuanqi/Documents/project/orderPane240520/orderPane/orderPane/order/commitlint.config.js from /Users/qiuanqi/Documents/project/orderPane240520/orderPane/orderPane/order/node_modules/.pnpm/cz-git@1.7.0/node_modules/cz-git/lib/index.js not supported.
commitlint.config.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead rename commitlint.config.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /Users/qiuanqi/Documents/project/orderPane240520/orderPane/orderPane/order/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
将js改为cjs