LinusU / LinusU/node-alias

TypeError: util.isDate is not a function

未关闭
#21 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
16
派生
23
PR 合并指标
30 天内没有已合并 PR

描述

Hi, the error is produced in Node 23 using a package that takes `macos-alias` as a dependency.

It seems to relate to `util.isDate`
https://github.com/LinusU/node-alias/blob/fb006c2ad35af646193e8744d7b43ef95c495af6/lib/encode.js#L8
```
⠏ Making hidden background folder/opt/homebrew/lib/node_modules/create-dmg/node_modules/macos-alias/lib/encode.js:8
if (util.isDate(value) === false) {
^

TypeError: util.isDate is not a function
at appleDate (/opt/homebrew/lib/node_modules/create-dmg/node_modules/macos-alias/lib/encode.js:8:12)
at exports (/opt/homebrew/lib/node_modules/create-dmg/node_modules/macos-alias/lib/encode.js:44:23)
at Object.exports [as create] (/opt/homebrew/lib/node_modules/create-dmg/node_modules/macos-alias/lib/create.js:145:10)
at Helper.write (/opt/homebrew/lib/node_modules/create-dmg/node_modules/ds-store/index.js:50:22)
at Object.fn (/opt/homebrew/lib/node_modules/create-dmg/node_modules/appdmg/lib/appdmg.js:391:8)
at Pipeline._runStep (/opt/homebrew/lib/node_modules/create-dmg/node_modules/appdmg/lib/pipeline.js:46:10)
at Pipeline._run (/opt/homebrew/lib/node_modules/create-dmg/node_modules/appdmg/lib/pipeline.js:94:10)
at next (/opt/homebrew/lib/node_modules/create-dmg/node_modules/appdmg/lib/pipeline.js:35:25)
at /opt/homebrew/lib/node_modules/create-dmg/node_modules/async/lib/async.js:52:16
at done (/opt/homebrew/lib/node_modules/create-dmg/node_modules/async/lib/async.js:246:17)

Node.js v23.1.0
```
https://github.com/sindresorhus/create-dmg/issues/93

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 lib/encode.js:8 开始,使用现有的 stack trace 跟踪 appleDate 的调用方式,并在 Node.js 23.1.0 中重现该故障。确认日期处理行为,并验证在报告的 Node 版本上创建别名可以正常工作,且不会破坏受支持的行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
operating-systems
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。