我正在尝试安装prettier
,pnpm install prettier -g
当我尝试在终端中运行它时,它给了我以下错误:
node:internal/modules/cjs/loader:944
throw err;
^
Error: Cannot find module '/Users/hugosum/pnpm-global/5/node_modules/prettier/bin-prettier.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
当我这样做时which prettier
,它给了我/usr/local/bin/prettier
。如何进一步调试和解决此问题?