[错误] String.prototype.split 在 null 或 undefined 上调用
It looks like it's because this inquire.js v9 commit removed the default of '' for the path: https://GitHub.com/SBoudrias/Inquirer.js/commit/ec786623d5094eee357b912cfaab56b4ddd66f05 I don't know if that was on purpose. I also haven't checked into the full trace to see which function plop is calling. I figure there's a few possible options to get this working: - Bug the inquire.js dev to fix a problem in a version that he considers to be legacy. dunno how that would go, but the commit seems to violate semver, so maybe he'll agree its a mistake. - Pass in a blank string if we think we'll pass null/undefined. Idk where the call is though, so maybe plop doesn't have the ability to influence the call - Update to the v10 release of inquire.js. IDK if there's compatibility issues though, or if this will even fix the issue - Hardcode the old inquire.js version in the package.json ("inquirer": "9.3.5") In the meantime, I've been able to bypass the problem by adding an override into my own tool's package.json: "overrides": { "node-plop": { "inquirer": "9.3.5" } }
内容来源: plopjs/plop