kickscondor / fraidycat

Follow blogs, wikis, YouTube channels, as well as accounts on Twitter, Instagram, etc. from a single page.
Other
1.76k stars 56 forks source link

Local install problem on Mac OS #265

Open jamesmagoo opened 1 year ago

jamesmagoo commented 1 year ago

Desktop (please complete the following information):

Describe the bug Cannot install the dependencies using npm install on Macbook due to following error:

npm ERR! code 1
npm ERR! path /Users/xxx/Developer/fraidycat/node_modules/@kickscondor/granax
npm ERR! command failed
npm ERR! command sh -c -- node script/download-tbb.js
npm ERR! Unsupported platform "darwin"

MacOS Monterey v12.3

jamesmagoo commented 1 year ago

Been looking into the @kickscondor/granax download-tbb.js createHref function (below)

function createHref(v) {
    const link = `https://dist.torproject.org/torbrowser/${v}`;

    switch (platform) {
      case 'win32':
        return `${link}/torbrowser-install-${v}_en-US.exe`;
      case 'darwin':
        return `${link}/TorBrowser-${v}-osx64_en-US.dmg`;
      case 'android':
      case 'linux':
        return os.arch() === 'x64'
          ? `${link}/tor-browser-linux64-${v}_en-US.tar.xz`
          : `${link}/tor-browser-linux32-${v}_en-US.tar.xz`
      default:
        throw new Error(`Unsupported platform "${platform}"`);
    }
  }

seems that the URL formats for .dmg (image below) have changed on https://dist.torproject.org/torbrowser and this is causing this error..

Screenshot 2023-11-20 at 19 46 37