electron-builder: Cannot find module '***' [Windows]

  • Version: 19.16.0
  • Target: windows 7 x64

Im building an app on windows. When build success and run app , then got error "Cannot find module “ultron”.

If add “ultron” to dependencies, got an other error : "Cannot find module “safe-buffer”.

I know issuse 217 but cannot work for me . module.paths is undifined ?

Anyone have ideas…

image

image

image

image

You see, if build on mac, more modules did put in than build on windows in win-unpacked\resources\app\node_modules folder

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

@develar Aha thanks… Its work for me now. FUCK NPM

As far I see (in my case solution “remove package-lock.json” helps), DO NOT USE F**** NPM. Sorry for capslock, but please do not ever use npm and never store package-lock.json (if you use npm by error, remove created package-lock.json after it and use only yarn).

try rebuild,electron-rebuild

I had the same issue with pnpm. After migrating to yarn the issue is solved. But what was the reason and why it doesn’t work with pnpm?

Do you use npm or yarn? Please remove package-lock.json, yarn.lock and node_modules And install using yarn (not npm) again.