Giter Site home page Giter Site logo

本地调试检测更新没有问题,打包成功后,安装electron应用时提示Cannot find module 'electron-updater' about electron-builder HOT 6 OPEN

CaoRuimiao avatar CaoRuimiao commented on September 22, 2024
本地调试检测更新没有问题,打包成功后,安装electron应用时提示Cannot find module 'electron-updater'

from electron-builder.

Comments (6)

18715672252 avatar 18715672252 commented on September 22, 2024 1

我解决了,不知道会不会对你有用

  1. 项目根目录新建.npmrc文件
    2.在文件中(.npmrc)加入node-linker=hoisted
    3.删除node_modules文件
    4.使用npm i 重新下载依赖(一定要使用npm下载依赖)

下面是我的版本号
"dependencies": {
"@electron-toolkit/utils": "^3.0.0",
"axios": "^1.6.8",
"electron-is-dev": "^3.0.1",
"form-data": "^4.0.0",
"electron-updater": "^6.2.1"
}

"devDependencies": {
"electron": "^30.0.4",
"electron-builder": "^24.13.3"
}

node 19.9.0
npm 9.6.3

from electron-builder.

ifurther avatar ifurther commented on September 22, 2024

Maybe try this #1949 (comment)

from electron-builder.

CaoRuimiao avatar CaoRuimiao commented on September 22, 2024

Maybe try this #1949 (comment)

在我的package.json配置中electron-updater是在dependencies下面呢,没太明白该怎么处理。
刚刚试了下按照您的回复中的版本安装后,本地启动报错:
Uncaught Exception:
Error: Cannot find module ‘fs/promises'

from electron-builder.

ifurther avatar ifurther commented on September 22, 2024

You will use the English to show the problem, and it will let more people help you.

from electron-builder.

PengDaDaDa avatar PengDaDaDa commented on September 22, 2024

delete "!node_modules" from files in package.json.
image

from electron-builder.

18715672252 avatar 18715672252 commented on September 22, 2024

我也遇到了

from electron-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.