Skip to content
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

Packaged AppImage errors #8

Open
jswhisperer opened this issue Apr 28, 2021 · 1 comment
Open

Packaged AppImage errors #8

jswhisperer opened this issue Apr 28, 2021 · 1 comment

Comments

@jswhisperer
Copy link

npm i output! [ 99%] Building CXX object CMakeFiles/nodegui_core.dir/src/cpp/lib/QtWidgets/QStandardItem/qstandarditem_wrap.cpp.o [100%] Linking CXX shared library Release/nodegui_core.node [100%] Built target nodegui_core npm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 678 packages from 479 contributors and audited 683 packages in 544.363s

16 packages are looking for funding
run npm fund for details

found 10 vulnerabilities (4 low, 3 moderate, 3 high)
run npm audit fix to fix them, or npm audit for details
gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$

npm run build "webpack -p" gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$ npm i --save-dev @nodegui/packer

@nodegui/[email protected] postinstall /home/gnb/Desktop/vue-nodegui-starter-master/node_modules/@nodegui/packer
node ./scripts/setupBinaries.js

Downloading Linux deploy Qt [=============================] 100% of 13.98MB 0.0s
Setting up permissions for linuxdeployqt
npm WARN @vue/[email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

  • @nodegui/[email protected]
    added 7 packages from 17 contributors and audited 690 packages in 20.759s

17 packages are looking for funding
run npm fund for details

found 10 vulnerabilities (4 low, 3 moderate, 3 high)
run npm audit fix to fix them, or npm audit for details
gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$ npm runbuild

Usage: npm

where is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami

npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview

Specify configs in the ini-formatted file:
/home/gnb/.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config

[email protected] /home/gnb/.nvm/versions/node/v14.15.4/lib/node_modules/npm

Did you mean this?
rebuild
gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$ npm run build

[email protected] build /home/gnb/Desktop/vue-nodegui-starter-master
webpack -p

Hash: cfa8d6ef691b03afcc7a
Version: webpack 4.44.2
Time: 29273ms
Built at: 2021-04-28 12:08:07 p.m.
Asset Size Chunks Chunk Names
00340d44a949fea32e5c523f38d68436.node 7.79 MiB [emitted]
main.js 3.09 MiB 0 [emitted] main
Entrypoint main = main.js
[22] external "path" 42 bytes {0} [built]
[30] external "os" 42 bytes {0} [built]
[43] (webpack)/buildin/module.js 497 bytes {0} [built]
[81] external "url" 42 bytes {0} [built]
[82] ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js + 2 modules 313 KiB {0} [built]
| 3 modules
[180] external "events" 42 bytes {0} [built]
[211] external "fs" 42 bytes {0} [built]
[221] external "crypto" 42 bytes {0} [built]
[291] external "http" 42 bytes {0} [built]
[292] external "https" 42 bytes {0} [built]
[293] external "querystring" 42 bytes {0} [built]
[294] external "zlib" 42 bytes {0} [built]
[314] ./main.js + 10 modules 3.95 KiB {0} [built]
| ./main.js 104 bytes [built]
| ./App.vue 291 bytes [built]
| ./App.vue?vue&type=template&id=c0b6c0d8&bindings={"inc":"setup","count":"setup","counterStyle":"setup"} 238 bytes [built]
| ./App.vue?vue&type=script&lang=js 210 bytes [built]
| ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--0!./App.vue?vue&type=template&id=c0b6c0d8&bindings={"inc":"setup","count":"setup","counterStyle":"setup"} 793 bytes [built]
| ./node_modules/vue-loader/dist??ref--0!./App.vue?vue&type=script&lang=js 417 bytes [built]
| ./Hero.vue 253 bytes [built]
| ./Hero.vue?vue&type=template&id=634e7e68&bindings={"viewStyle":"setup"} 198 bytes [built]
| ./Hero.vue?vue&type=script&lang=js 212 bytes [built]
| ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--0!./Hero.vue?vue&type=template&id=634e7e68&bindings={"viewStyle":"setup"} 753 bytes [built]
| ./node_modules/vue-loader/dist??ref--0!./Hero.vue?vue&type=script&lang=js 567 bytes [built]
+ 302 hidden modules
gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$ npm run build

[email protected] build /home/gnb/Desktop/vue-nodegui-starter-master
webpack -p

Hash: cfa8d6ef691b03afcc7a
Version: webpack 4.44.2
Time: 11279ms
Built at: 2021-04-28 12:10:40 p.m.
Asset Size Chunks Chunk Names
00340d44a949fea32e5c523f38d68436.node 7.79 MiB [emitted]
main.js 3.09 MiB 0 [emitted] main
Entrypoint main = main.js
[22] external "path" 42 bytes {0} [built]
[30] external "os" 42 bytes {0} [built]
[43] (webpack)/buildin/module.js 497 bytes {0} [built]
[81] external "url" 42 bytes {0} [built]
[82] ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js + 2 modules 313 KiB {0} [built]
| 3 modules
[180] external "events" 42 bytes {0} [built]
[211] external "fs" 42 bytes {0} [built]
[221] external "crypto" 42 bytes {0} [built]
[291] external "http" 42 bytes {0} [built]
[292] external "https" 42 bytes {0} [built]
[293] external "querystring" 42 bytes {0} [built]
[294] external "zlib" 42 bytes {0} [built]
[314] ./main.js + 10 modules 3.95 KiB {0} [built]
| ./main.js 104 bytes [built]
| ./App.vue 291 bytes [built]
| ./App.vue?vue&type=template&id=c0b6c0d8&bindings={"inc":"setup","count":"setup","counterStyle":"setup"} 238 bytes [built]
| ./App.vue?vue&type=script&lang=js 210 bytes [built]
| ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--0!./App.vue?vue&type=template&id=c0b6c0d8&bindings={"inc":"setup","count":"setup","counterStyle":"setup"} 793 bytes [built]
| ./node_modules/vue-loader/dist??ref--0!./App.vue?vue&type=script&lang=js 417 bytes [built]
| ./Hero.vue 253 bytes [built]
| ./Hero.vue?vue&type=template&id=634e7e68&bindings={"viewStyle":"setup"} 198 bytes [built]
| ./Hero.vue?vue&type=script&lang=js 212 bytes [built]
| ./node_modules/vue-loader/dist/templateLoader.js??ref--5!./node_modules/vue-loader/dist??ref--0!./Hero.vue?vue&type=template&id=634e7e68&bindings={"viewStyle":"setup"} 753 bytes [built]
| ./node_modules/vue-loader/dist??ref--0!./Hero.vue?vue&type=script&lang=js 567 bytes [built]
+ 302 hidden modules
gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$

npm run init ""init": "nodegui-packer --init MyAppName","

"pack": "nodegui-packer --pack ./dist" internal/modules/cjs/loader.js:1023 throw err; ^

Error: Cannot find module './dist'
Require stack:

  • /tmp/.mount_ApplicdglQPA/index.js
  • internal/preload
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
    at Function.Module._load (internal/modules/cjs/loader.js:890:27)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object. (/tmp/.mount_ApplicdglQPA/index.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Module.require (internal/modules/cjs/loader.js:1080:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/tmp/.mount_ApplicdglQPA/index.js', 'internal/preload' ]
    }
    gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$

a

and finally launching the app image

internal/modules/cjs/loader.js:1023
throw err;
^

Error: Cannot find module './dist'
Require stack:

  • /tmp/.mount_ApplicdglQPA/index.js
  • internal/preload
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
    at Function.Module._load (internal/modules/cjs/loader.js:890:27)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object. (/tmp/.mount_ApplicdglQPA/index.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:1176:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
    at Module.load (internal/modules/cjs/loader.js:1040:32)
    at Function.Module._load (internal/modules/cjs/loader.js:929:14)
    at Module.require (internal/modules/cjs/loader.js:1080:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/tmp/.mount_ApplicdglQPA/index.js', 'internal/preload' ]
    }
    gnb@gnb-MacBookPro:~/Desktop/vue-nodegui-starter-master$
@MonsieurV
Copy link

I found that it works by changing deploy/linux/<YourApp>/index.js last line, from:

require("./dist");

to

require("./dist/main.js");

(You need to require and call the actual Webpack bundle/target file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants