Fariarx / ProtoUV

Opensource slicer for photopolymer 3d printers
MIT License
34 stars 1 forks source link

Linux Support #1

Open fleixi opened 1 year ago

fleixi commented 1 year ago

I like to test this on linux and tried to build it on linux.

To get it build i need to move

"@types/archiver": "^5.3.1",
"@types/lodash": "^4.14.191",
"@types/sharp": "^0.31.1",
"@types/worker-plugin": "^5.0.1"

from "dependencies" to "devDependencies" because i get this errors:

$ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
$ ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts && opencollective-postinstall
  • electron-builder  version=23.6.0
  • loaded configuration  file=package.json ("build" field)
  • installing production dependencies  platform=linux arch=x64 appDir=/home/fleixi/Entwicklung/ProtoUV/release/app
ERROR in dll renderer renderer[0]
Module not found: Error: Can't resolve '@types/archiver' in '/home/fleixi/Entwicklung/ProtoUV'

ERROR in dll renderer renderer[1]
Module not found: Error: Can't resolve '@types/lodash' in '/home/fleixi/Entwicklung/ProtoUV'

ERROR in dll renderer renderer[2]
Module not found: Error: Can't resolve '@types/sharp' in '/home/fleixi/Entwicklung/ProtoUV'

ERROR in dll renderer renderer[3]
Module not found: Error: Can't resolve '@types/worker-plugin' in '/home/fleixi/Entwicklung/ProtoUV'

webpack compiled with 4 errors
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

fix found at: https://stackoverflow.com/questions/61074030/module-not-found-error-cant-resolve-types-svgo

but now if it try to start it get this error:

$ yarn run start
yarn run v1.22.19
$ ts-node ./.erb/scripts/check-port-in-use.js && yarn run build:worker && yarn run start:renderer
$ cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.workers.js
asset slice.worker.bundle.js 2.75 MiB [compared for emit] (name: main)
runtime modules 670 bytes 3 modules
modules by path ./node_modules/three-mesh-bvh/src/ 144 KiB
  modules by path ./node_modules/three-mesh-bvh/src/utils/*.js 25.6 KiB 7 modules
  modules by path ./node_modules/three-mesh-bvh/src/core/*.js 59.4 KiB 6 modules
  modules by path ./node_modules/three-mesh-bvh/src/math/*.js 26.7 KiB 4 modules
  modules by path ./node_modules/three-mesh-bvh/src/gpu/*.js 21 KiB 3 modules
  + 3 modules
modules by path ./node_modules/three/ 2.26 MiB
  modules by path ./node_modules/three/examples/jsm/lines/*.js 25.8 KiB 3 modules
  modules by path ./node_modules/three/build/ 2.22 MiB
    ./node_modules/three/build/three.cjs 1.1 MiB [built] [code generated]
    ./node_modules/three/build/three.module.js 1.13 MiB [built] [code generated]
  ./node_modules/three/src/constants.js 6.66 KiB [built] [code generated]
./src/workers/slice.worker.ts 12 KiB [built] [code generated]
webworker (webpack 5.75.0) compiled successfully in 694 ms
$ cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts
Starting preload.js builder...
Starting Main Process...
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:1212/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.16.15:1212/
<i> [webpack-dev-server] Content not from webpack is served from '/home/fleixi/Entwicklung/ProtoUV/public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'

> protouv@1.0.0 start:preload
> cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts

> protouv@1.0.0 start:main
> cross-env NODE_ENV=development electronmon -r ts-node/register/transpile-only ./src/main/main.ts

[electronmon] waiting for a change to restart it
(node:29179) ExtensionLoadWarning: Warnings loading extension at /home/fleixi/.config/Electron/extensions/fmkadmapgofadopljbjfkapdkoienihi:
  Permission 'scripting' is unknown or URL pattern is malformed.

(Use `electron --trace-warnings ...` to show where the warning was created)
[29179:0227/110644.446726:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   2
  Source:  chrome-extension://fifofimfbegfeodapcnallponofelnef/build/background.js
  Message: Uncaught TypeError: Cannot read properties of undefined (reading 'registerContentScripts')
  ID:      fifofimfbegfeodapcnallponofelnef
  Type:    RuntimeError
  Context: chrome-extension://fifofimfbegfeodapcnallponofelnef/build/background.js
  Stack Trace: 
    {
      Line:     107
      Column:   1
      URL:      chrome-extension://fifofimfbegfeodapcnallponofelnef/build/background.js
      Function: (anonymous function)
    }
[29179:0227/110644.447064:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   1
  Source:  manifest.json
  Message: Service worker registration failed. Status code: 15
  ID:      fifofimfbegfeodapcnallponofelnef
  Type:    ManifestError
<i> [webpack-dev-middleware] wait until bundle finished: /index.html
ERROR in ./src/renderer/Main/Components/ToolsRight/Supports/App.tsx 9:29-84
Module not found: Error: Can't resolve '@react-icons/all-files/Md/MdAddCircleOutline' in '/home/fleixi/Entwicklung/ProtoUV/src/renderer/Main/Components/ToolsRight/Supports'
 @ ./src/renderer/Main/Components/ToolsRight/App.tsx 15:14-39
 @ ./src/renderer/App.tsx 21:14-57
 @ ./src/renderer/index.tsx 7:14-30

ERROR in ./src/renderer/Main/Components/ToolsRight/Supports/App.tsx 10:32-90
Module not found: Error: Can't resolve '@react-icons/all-files/Md/MdRemoveCircleOutline' in '/home/fleixi/Entwicklung/ProtoUV/src/renderer/Main/Components/ToolsRight/Supports'
 @ ./src/renderer/Main/Components/ToolsRight/App.tsx 15:14-39
 @ ./src/renderer/App.tsx 21:14-57
 @ ./src/renderer/index.tsx 7:14-30

webpack compiled with 2 errors
Not rewriting GET /index.html because the path includes a dot (.) character.
[29214:0227/110647.426904:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[29214:0227/110647.442783:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
Status Code: 200
Date in Response header: Mon, 27 Feb 2023 10:06:47 GMT
[29179:0227/110647.764716:ERROR:CONSOLE(2)] "Electron sandboxed_renderer.bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (2)
[29179:0227/110647.764750:ERROR:CONSOLE(2)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (2)
[29214:0227/110653.387534:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
[electronmon] app exited with code 0, waiting for change to restart it

Im not into react/node and electron so i have no clou what im missing.

Fariarx commented 1 year ago

I'm still rebuilding the project for the web, and I don't have time to debug what is currently in the repository. Perhaps I will come back to this issue as soon as I finish my work. And most likely electron will be excluded from this project with the next commit.