dosyago / dn

💾 dn - offline full-text search and archiving for your Chromium-based browser.
https://localhost:22120
Other
3.78k stars 145 forks source link

Compile script throws error #120

Closed nicoandmee closed 2 years ago

nicoandmee commented 2 years ago

When I attempt to build the project using ./scripts/compile.sh I get the following output:

Now using node v16.14.1 (npm v8.5.0)
Cleaning old build and dist files...
v16.14.1
Setting build (CJS) mode...
---> node_modules/fetch-blob/streams.cjs UNPATCHED!
Found an error!
Found something you need to patch before building
See: https://github.com/vercel/pkg/issues/1451

node_modules/fetch-blob/streams.cjs:      Object.assign(globalThis, require('node:stream/web'))

You need to add all these to pkg.patches to replace with require('stream').web

What do I need to do to fix this?

o0101 commented 2 years ago

Oh, good point.

I'm not sure if this will work for you, and I'm super busy right now so this is all I have for you for a while, but try doing this:

  1. Go into any listed files, i.e., above: node_modules/fetch-blob/streams.cjs
  2. Search for the listed line: i.e, above: Object.assign(globalThis, require('node:stream/web'))
  3. Change any such lines listed to replace the require('node:stream/web') with require('stream').web

I'm sorry if that doesn't work I can't help out on this until later, if ever.

Best of luck to you with this!