以前一切正常,但今天..不确定..不知道为什么,这里是错误:
/Users/harpreetsingh/Downloads/folio-cedrik/node_modules/gift/lib/commit.js:145
ref1 = /^.+? (.*) (\d+) .*$/.exec(line), m = ref1[0], actor = ref1[1], epoch = ref1[2];
^
TypeError: Cannot read property '0' of null
at Function.module.exports.Commit.actor (/Users/harpreetsingh/Downloads/folio-cedrik/node_modules/gift/lib/commit.js:145:56)
at Function.module.exports.Commit.parse_commits (/Users/harpreetsingh/Downloads/folio-cedrik/node_modules/gift/lib/commit.js:111:21)
at /Users/harpreetsingh/Downloads/folio-cedrik/node_modules/gift/lib/commit.js:71:39
at ChildProcess.exithandler (child_process.js:189:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:891:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
如何解决?不知道这意味着什么。
再次感谢您。
[对于仍然碰巧也使用Yarn的任何人,我在package.json
中的“分辨率”中添加了一个字段,以确保运行yarn install
时,Gift的正确版本获胜。
在我的package.json
文件中添加:
{
...other package.json stuff...,
"resolutions": {
"gift": "^0.10.2"
}
}
这为我解决了问题。