ionic update-notifier-cordova.json' You don't have access to this file:如何解决?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (81)

我试图在IOS上运行离子型的,但它会引发一个错误。

怎么了?

ionic run ios
    /usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:53
                    throw err;
                          ^
    Error: EACCES, permission denied '/Users/jiahongl/.config/configstore/update-notifier-cordova.json'
    You don't have access to this file.

        at Error (native)
        at Object.fs.openSync (fs.js:500:18)
        at Object.fs.readFileSync (fs.js:352:15)
        at Object.create.all.get (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:34:26)
        at Object.Configstore (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:27:44)
        at new UpdateNotifier (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:34:17)
        at module.exports (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:123:23)
        at checkForUpdates (/usr/local/lib/node_modules/cordova/src/cli.js:64:20)
        at cli (/usr/local/lib/node_modules/cordova/src/cli.js:114:5)
        at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1)

提问于
用户回答回答于
用户回答回答于

我刚更改了文件的权限update-notifier-cordova.json通过以下命令:

sudo chmod -R 777 '/Users/anand.d.gupta/.config/configstore/update-notifier-cordova.json'

扫码关注云+社区