LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.7k stars 152 forks source link

TypeError: util.isDate is not a function #243

Open dabrain34 opened 1 week ago

dabrain34 commented 1 week ago

Since today, I'm unable to use appdmg anymore getting the error:

make macos installer(.dmg)......
[ 1/21] Looking for target...                [ OK ]
[ 2/21] Reading JSON Specification...        [ OK ]
[ 3/21] Parsing JSON Specification...        [ OK ]
[ 4/21] Validating JSON Specification...     [ OK ]
[ 5/21] Looking for files...                 [ OK ]
[ 6/21] Calculating size of image...         [ OK ]
[ 7/21] Creating temporary image...          [ OK ]
[ 8/21] Mounting temporary image...          [ OK ]
[ 9/21] Making hidden background folder...   [ OK ]
[10/21] Copying background...                [ OK ]
[11/21] Reading background dimensions...     [ OK ]
[12/21] Copying icon...                      [ OK ]
[13/21] Setting icon...                      [ OK ]
[14/21] Creating links...                    [ OK ]
[15/21] Copying files...                     [ OK ]
[16/21] Making all the visuals...            
TypeError: util.isDate is not a function
[failed]
make macos portable......[done]

See https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio/-/jobs/66330552

A few weeks ago it was complaining about

[16/21] Making all the visuals...            (node:60904) [DEP0047] DeprecationWarning: The `util.isDate` API is deprecated.  Please use `arg instanceof Date` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio/-/jobs/64591511/raw

dabrain34 commented 1 week ago

I checked the version of node and I was using v22.9.0 instead of the new one which is v23.1.0

scosman commented 1 week ago

beat me to it by 7 mins. Same issue on node v23.1

dabrain34 commented 1 week ago

I tried to install v22.9.0 with

nvm install v22.9.0

But appdmg is not correctly installed then.

scosman commented 1 week ago

This seems to be the source: https://github.com/LinusU/node-alias/blob/fb006c2ad35af646193e8744d7b43ef95c495af6/lib/encode.js#L8

dabrain34 commented 1 week ago

good pick !

dabrain34 commented 1 week ago

https://github.com/LinusU/node-alias/pull/20

bahricanyesil commented 1 week ago

How can we temporarily fix this @dabrain34 @scosman ?

scosman commented 1 week ago

Just use node 20 for now. I use nvm to switch it.

bahricanyesil commented 1 week ago

Thank you. I will use it temporarily until the related PR is merged.

Just use node 20 for now. I use nvm to switch it.

dabrain34 commented 1 week ago

https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio/-/merge_requests/69/diffs