0
我有時間調試這個錯誤 - 尋找另一組眼睛。Yeoman發生器錯誤this.log = this.env.adapter.log;
我分叉羅曼·伯傑的約曼WordPress的發電機來修改我的工作流程,github上回購在這裏: https://github.com/mykepreuss/yeoman-wordpress
NPM鏈接到我的發電機在這裏: https://npmjs.org/package/generator-assembly-wp
後,我安裝並運行:yo assembly-wp
我收到以下錯誤:
/usr/local/lib/node_modules/generator-assembly-wp/node_modules/yeoman-generator/lib/base.js:79
this.log = this.env.adapter.log;
^
TypeError: Cannot read property 'log' of undefined
at Generator.Base (/usr/local/lib/node_modules/generator-assembly-wp/node_modules/yeoman-generator/lib/base.js:79:30)
at new Generator (/usr/local/lib/node_modules/generator-assembly-wp/app/index.js:17:26)
at Environment.create (/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/lib/env/index.js:325:10)
at Environment.run (/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/lib/env/index.js:361:24)
at init (/usr/local/lib/node_modules/yo/cli.js:95:7)
at pre (/usr/local/lib/node_modules/yo/cli.js:108:3)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/cli.js:134:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
任何幫助將不勝感激!
我在哪裏看對於發電機系統版本@ simon-boudrias - 感謝您的幫助,想知道您的故障排除方法。 –
與每個node.js模塊一樣,在'package.json'文件中。對於'yo',因爲它是一個全局包,只需運行'npm ls -g --depth = 0'並檢查它給你的版本。要安裝最新版本,只需運行'npm install @'。 –
好的,我看@ @ simon-boudrias - 謝謝你,我對此一無所知。非常感激! –