刚刚安装
npm install -g yo generator-office
就像
https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/word-quickstart?tabs=visual-studio-code
.在运行yo时,获得以下信息:
/usr/local/lib/node_modules/yo/node_modules/write-file-atomic/index.js:197
throw err
^
Error: EACCES: permission denied, open '/Users/amarshanand/Library/Preferences/insight-nodejs/insight-yo.json.4213605520'
at Object.fs.openSync (fs.js:646:18)
at Function.writeFileSync [as sync] (/usr/local/lib/node_modules/yo/node_modules/write-file-atomic/index.js:180:17)
at Conf.set store [as store] (/usr/local/lib/node_modules/yo/node_modules/conf/index.js:142:19)
at new Conf (/usr/local/lib/node_modules/yo/node_modules/conf/index.js:44:14)
at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/index.js:40:35)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/lib/cli.js:46:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
事实上,文件
insight-yo.json.4213605520
根本不存在。存在的是
insight-yo.json
.你知道怎么了吗?
版本:
+ generator-office@1.1.14
+ yo@2.0.4