我也有个问题,安装时报错。
sfyr111 opened this issue · 4 comments
sfyr111 commented
环境:mac、node-v12.18.2、npm-6.14.5
已安装依赖:alfy(全局)、projj(全局)、alfred-link(全局)
已安装应用:alfred-v3.6
全局安装插件报错
➜ ~ sudo npm i alfred-plugin-projj -g
> alfred-plugin-projj@1.1.0 postinstall /Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfred-plugin-projj
> alfy-init
Error: Command failed with exit code 1 (EPERM): alfred-link
at makeError (/Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfred-plugin-projj/node_modules/execa/lib/error.js:59:11)
at handlePromise (/Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfred-plugin-projj/node_modules/execa/index.js:112:26)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfred-plugin-projj/node_modules/alfy/init.js:7:3 {
command: 'alfred-link',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: 'Error: Permission denied to read Alfred preferences at location /Users/yangran/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
' at module.exports (/Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfred-plugin-projj/node_modules/resolve-alfred-prefs/index.js:44:9)',
all: 'Error: Permission denied to read Alfred preferences at location /Users/yangran/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
' at module.exports (/Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfred-plugin-projj/node_modules/resolve-alfred-prefs/index.js:44:9)',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! alfred-plugin-projj@1.1.0 postinstall: `alfy-init`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alfred-plugin-projj@1.1.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yangran/.npm/_logs/2020-08-10T03_07_11_971Z-debug.log
alfy-init 命令执行报错
➜ ~ alfy-init
Error: Command failed with exit code 1 (EPERM): alfred-link
at makeError (/Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfy/node_modules/execa/lib/error.js:59:11)
at handlePromise (/Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfy/node_modules/execa/index.js:112:26)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfy/init.js:7:3 {
command: 'alfred-link',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: 'TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined\n' +
' at validateString (internal/validators.js:120:11)\n' +
' at Object.dirname (path.js:1128:5)\n' +
' at /Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfy/node_modules/alfred-link/index.js:52:21 {\n' +
" code: 'ERR_INVALID_ARG_TYPE'\n" +
'}',
all: 'TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined\n' +
' at validateString (internal/validators.js:120:11)\n' +
' at Object.dirname (path.js:1128:5)\n' +
' at /Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfy/node_modules/alfred-link/index.js:52:21 {\n' +
" code: 'ERR_INVALID_ARG_TYPE'\n" +
'}',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
}
alfred-link 命令执行报错
➜ ~ alfred-link
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:120:11)
at Object.dirname (path.js:1128:5)
at /Users/yangran/.nvm/versions/node/v12.18.2/lib/node_modules/alfred-link/index.js:52:21 {
code: 'ERR_INVALID_ARG_TYPE'
}
atian25 commented
Error: Permission denied to read Alfred preferences at location /Users/yangran/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
权限问题
sfyr111 commented
Error: Permission denied to read Alfred preferences at location /Users/yangran/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
权限问题
尴尬,sudo npm i alfred-plugin-projj -g
命令启动的时候已经加了 sudo 了
sfyr111 commented
是因为我 alfred 没买 powerpack 服务吗?
sfyr111 commented
powerpack 权限问题