Ziv-Barber / officegen

Standalone Office Open XML files (Microsoft Office 2007 and later) generator for Word (docx), PowerPoint (pptx) and Excell (xlsx) in javascript. The output is a stream.
MIT License
2.65k stars 471 forks source link

Can't resolve 'readable-stream/passthrough' when building desktop app with electron #344

Open justin87qq opened 4 years ago

justin87qq commented 4 years ago

Environment

  1. node -v: v13.5.0
  2. npm -v: 6.13.4
  3. npm ls officegen:
  4. Operating system: win10
  5. Microsoft Office version: 2019
  6. Problem with Powerpoint, Excel or Word document: N/A

it works fine in node.js, but breaks when required in electron

Actual Behavior

./node_modules/officegen/lib/core/index.js

Module not found: Can't resolve 'readable-stream/passthrough' in 'D:\electron-app\node_modules\officegen\lib\core'

Ziv-Barber commented 4 years ago

Strange. I made an electron project with it an it worked fine for me. What version of electron are you using? Can you provide an example project so I can see the problem?