New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I couldn't build successfully in electron #1746
Comments
The electron version is 27.1.0 |
Mee too. But the electron version is 9.3.3. |
My electron app build also starts complaining.
|
same here. I have temp workaround
however that sounds like thing related to cache. When removed the cache it has been rebuild and more ore less started working (can't check with @electron/rebuild now but i guess it may work now) I also noticed that node 18 has napi 9 so the requested target v36 might be a clue of the issue
the issue seems to be with one of legacy dependencies of electron-builder. I reported a bug there |
me too!How did you solve it |
@liyang9331 |
prebuild-install http request GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v36-darwin-arm64.tar.gz why it is sqlite3-v5.1.7-napi-v36-darwin-arm64.tar.gz, it is 404, why do it down sqlite3-v5.1.7-napi-v36-darwin-arm64.tar.gz? |
I ran into the same issue trying to install 5.1.7. Installing 5.1.6 instead works builds with no issue. npm install -E sqlite3@5.1.6 Running node v20.9.0 on my win 10 system, building with electron v28.1.4 and electron-builder v24.9.1 section of the output with env var "DEBUG=electron-builder"
|
…e of a build error related to trying to use a non-existing N-APi version napi v36 (see TryGhost/node-sqlite3#1748 and TryGhost/node-sqlite3#1746)
Same here, this worked for me |
I also encountered the same problem, why is the N-API version 36 instead of the specific version?
|
I have the same issue. npm install -E sqlite3@5.1.6 This really solves for me. Thanks. @ADumaine |
@draungminoo Thank you so much |
@draungminoo Thank you~! |
me too.revert to 5.1.6 is ok. |
我有一个不降低版本的做法:
|
same here. I guess something is wrong with version detecting logic, it is supposed to return 3 or 6, not 36 |
I revert to 5.1.6 got below error, anyone with me?
|
Issue Summary
I have used sqlite3 in electron, which can be successfully dev, but the following error will be reported during build. I don't know how I should solve this problem, so I would like to ask if anyone can help me solve this problem.
The related dependency versions I use are as follows:
The sqlite3 version is 5.1.7,
The node-gyp version is 8.4.1.
The node version is 16.18.0.
The yarn version is 1.22.21
Relevant logs or output
yarn run v1.22.21
$ vue-tsc --noEmit && vite build && electron-builder
[unplugin-vue-components] component "Basic"(D:/work/xxx/xxx/src/components/SyncProgress/src/Basic.vue) has naming conflicts with other components, ignored.
vite v4.5.1 building for production...
node_modules/easemob-websdk/miniCore/miniCore.js (1:7237) Use of eval in "node_modules/easemob-websdk/miniCore/miniCore.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/easemob-websdk/Easemob-chat.js (1:7237) Use of eval in "node_modules/easemob-websdk/Easemob-chat.js" is strongly discouraged as it poses security risks and may cause issues with minification.
✓ 1771 modules transformed.
dist/index.html 0.55 kB │ gzip: 0.40 kB
dist/assets/head2-58730d9e.jpg 4.94 kB
dist/assets/iconfont-f83ad384.ttf 5.21 kB
dist/assets/iconfont-43aa91a6.eot 5.38 kB
dist/assets/head3-8654d57e.jpg 8.01 kB
dist/assets/head1-44e62e25.jpg 8.23 kB
dist/assets/head-91484c92.jpg 9.90 kB
dist/assets/iconfont-0f08d651.svg 17.06 kB │ gzip: 6.11 kB
dist/assets/login-e2a4b4ad.png 247.52 kB
dist/assets/index-e066774d.css 0.15 kB │ gzip: 0.14 kB
dist/assets/PullPerson-1f2a124e.css 0.22 kB │ gzip: 0.14 kB
dist/assets/SingleChat-0bc457f9.css 0.30 kB │ gzip: 0.18 kB
dist/assets/SelfChatList-f581c094.css 0.52 kB │ gzip: 0.32 kB
dist/assets/index-9e7f23c0.css 0.82 kB │ gzip: 0.38 kB
dist/assets/BacklogList-a1abf7d2.css 1.49 kB │ gzip: 0.44 kB
dist/assets/el-radio-94b07b0d.css 4.39 kB │ gzip: 0.99 kB
dist/assets/GroupChat-1efd6e54.css 43.83 kB │ gzip: 5.22 kB
dist/assets/index-19300c20.css 379.31 kB │ gzip: 59.42 kB
dist/assets/index-72bdf85a.js 0.49 kB │ gzip: 0.35 kB
dist/assets/index-687f6d70.js 0.81 kB │ gzip: 0.56 kB
dist/assets/BacklogList-9596c239.js 1.65 kB │ gzip: 0.90 kB
dist/assets/PullPerson-d942f364.js 2.62 kB │ gzip: 1.35 kB
dist/assets/SelfChatList-07907cbf.js 3.26 kB │ gzip: 1.65 kB
dist/assets/SingleChat-05682c53.js 5.31 kB │ gzip: 2.49 kB
dist/assets/el-radio-52869d58.js 18.88 kB │ gzip: 7.49 kB
dist/assets/GroupChat-4045fd19.js 24.87 kB │ gzip: 7.58 kB
dist/assets/index-4b322429.js 2,015.87 kB │ gzip: 572.97 kB
(!) Some chunks are larger than 500 kBs after minification. Consider:
✓ built in 11.66s
vite v4.5.1 building for production...
✓ 21 modules transformed.
dist-electron/main/index.js 0.17 kB │ gzip: 0.11 kB
dist-electron/main/index-17415e26.js 1.27 kB │ gzip: 0.64 kB
dist-electron/main/index-17e8c2e0.js 2.52 kB │ gzip: 1.02 kB
dist-electron/main/index-1dff5a59.js 10.02 kB │ gzip: 4.11 kB
✓ built in 95ms
vite v4.5.1 building for production...
✓ 8 modules transformed.
dist-electron/preload/index.js 4.06 kB │ gzip: 1.59 kB
✓ built in 29ms
• electron-builder version=24.9.1 os=10.0.19044
• loaded configuration file=D:\work\xxx\electron-builder.json5
• @electron/rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies
To ensure your native dependencies are always matched electron version, simply add script
"postinstall": "electron-builder install-app-deps" to your
package.json`• writing effective config file=release\1.0.0\builder-effective-config.yaml
• rebuilding native dependencies dependencies=sqlite3@5.1.7 platform=win32 arch=x64
• install prebuilt binary name=sqlite3 version=5.1.7 platform=win32 arch=x64 napi=
• build native dependency from sources name=sqlite3
version=5.1.7
platform=win32
arch=x64
napi=
reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
error=prebuild-install info begin Prebuild-install version 7.1.1
prebuild-install warn This package does not support N-API version 36
prebuild-install warn install prebuilt binaries enforced with --force!
prebuild-install warn install prebuilt binaries may be out of date!
prebuild-install info looking for local prebuild @ prebuilds\sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz
prebuild-install info looking for cached prebuild @ C:\Users\user\AppData\Roaming\npm-cache_prebuilds\9aa761-sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz
prebuild-install http request GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz
prebuild-install warn install connect ETIMEDOUT 20.205.243.166:443
• rebuilding native dependency name=sqlite3 version=5.1.7
⨯ cannot execute cause=exit status 1
$ prebuild-install -r napi || node-gyp rebuild
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Version
5.1.7
Node.js Version
16.18.0
How did you install the library?
yarn add sqlite3
The text was updated successfully, but these errors were encountered: