esbuild
起初是项目install时导致的问题,问题如下:
一开始还以为是安装依赖问题,没有特别在意;
但是看了看package.json,发现并没有依赖esbuild,那么应该是其他库依赖esbuild了; 然后看了看node_moduls/.pnpm/下的依赖,发现其实是存在esbuild的;
网上说直接运行node node_modules/esbuild/install.js,我试了试;改了下路径node node_modules.pnpm\esbuild@0.23.0\node_modules\esbuild\install.js,发现依旧是报错;
在找了找,发现目录都是完整的;
后续找了很多问题,直到找了一个issue: github.com/evanw/esbui…
里面提到了一个Q: esbuild.github.io/faq/#anti-v…
Having to deal with false-positives is an unfortunate reality of using anti-virus software. Here are some possible workarounds if your anti-virus won't let you use esbuild:
- Ignore your anti-virus software and remove esbuild from quarantine
- Report the specific esbuild native executable as a false-positive to your anti-virus software vendor
- Use
esbuild-wasminstead ofesbuildto bypass your anti-virus software (which likely won't flag WebAssembly files the same way it flags native executables) - Use another build tool instead of esbuild
大意就是,需要关闭杀毒软件。。。
恩,我随即关掉了,然后删除node_modules,重新pnpm,搞定!