luc-github / ESP3D-WEBUI

A Web UI for ESP8266 or ESP32 based boards connected to 3D printers / CNC
GNU General Public License v3.0
762 stars 305 forks source link

how i can compile this new webui for version 3? #113

Closed labotecno closed 4 years ago

labotecno commented 4 years ago

do you have a tutorial to install the new version V3 ? thank you if not can you help me to do it

luc-github commented 4 years ago

everything is in readme and the compiled version is in dist directory

Documentation will be started when I am done with todo list of webUI https://github.com/luc-github/ESP3D-WEBUI/issues/94#issuecomment-686951401

labotecno commented 4 years ago

can i use windows 10 ?

labotecno commented 4 years ago

C:\esp3\ESP3D-WEBUI-3.0>npm install npm WARN saveError ENOENT: no such file or directory, open 'C:\esp3\ESP3D-WEBUI-3.0\package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open 'C:\esp3\ESP3D-WEBUI-3.0\package.json' npm WARN ESP3D-WEBUI-3.0 No description npm WARN ESP3D-WEBUI-3.0 No repository field. npm WARN ESP3D-WEBUI-3.0 No README data npm WARN ESP3D-WEBUI-3.0 No license field.

up to date in 1.043s found 0 vulnerabilities C:\esp3\ESP3D-WEBUI-3.0>npm -v node -v 6.14.6

C:\esp3\ESP3D-WEBUI-3.0>npm run dev npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\esp3\ESP3D-WEBUI-3.0\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\esp3\ESP3D-WEBUI-3.0\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\labotecno\AppData\Roaming\npm-cache_logs\2020-09-04T08_56_05_441Z-debug.log i get this

luc-github commented 4 years ago

Yes I use windows 10 your version of npm is too old (should be 6.4.1) what is your version of node?

labotecno commented 4 years ago

6.14.6 where i can to get the new version ?

luc-github commented 4 years ago

this is your version of npm, type node -v

labotecno commented 4 years ago

v12.18.3

luc-github commented 4 years ago

as mentioned in read me I use v10.15.3 - I will chek why latest LTS v12.18.3 show such messages

labotecno commented 4 years ago

as mentioned in read me I use v10.15.3 - I will chek why latest LTS v12.18.3 show such messages

thank you i hope its working i want to try version 3

luc-github commented 4 years ago

I have did a fresh install on one windows 10 and an update on my Programming PC also win10, installation is pretty long but ok

Microsoft Windows [Version 10.0.18362.1016]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\luc>npm -v
6.14.6

C:\Users\luc>node -v
v12.18.3

C:\Users\luc>cd Documents

C:\Users\luc\Documents>cd GitHub

C:\Users\luc\Documents\GitHub>cd ESP3D-WEBUI

C:\Users\luc\Documents\GitHub\ESP3D-WEBUI>npm install

> node-sass@4.14.1 install C:\Users\luc\Documents\GitHub\ESP3D-WEBUI\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/win32-x64-72_binding.node
Download complete  ] - :
Binary saved to C:\Users\luc\Documents\GitHub\ESP3D-WEBUI\node_modules\node-sass\vendor\win32-x64-72\binding.node
Caching binary to C:\Users\luc\AppData\Roaming\npm-cache\node-sass\4.14.1\win32-x64-72_binding.node

> node-sass@4.14.1 postinstall C:\Users\luc\Documents\GitHub\ESP3D-WEBUI\node_modules\node-sass
> node scripts/build.js

Binary found at C:\Users\luc\Documents\GitHub\ESP3D-WEBUI\node_modules\node-sass\vendor\win32-x64-72\binding.node
Testing binary
Binary is fine

> nodemon@2.0.4 postinstall C:\Users\luc\Documents\GitHub\ESP3D-WEBUI\node_modules\nodemon
> node bin/postinstall || exit 0

npm WARN ESP3D-WebUI@3.0.0 scripts['server'] should probably be scripts['start'].
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1294 packages from 609 contributors and audited 1297 packages in 34.14s

46 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Then build :

C:\Users\luc\Documents\GitHub\ESP3D-WEBUI>npm run build

> ESP3D-WebUI@3.0.0 build C:\Users\luc\Documents\GitHub\ESP3D-WEBUI
> npm run build-printer & npm run build-grbl & npm run build-lang

> ESP3D-WebUI@3.0.0 build-printer C:\Users\luc\Documents\GitHub\ESP3D-WEBUI
> cross-env NODE_ENV=production TARGET_ENV=printer webpack --mode=production

remove-files-plugin@1.4.3:
Skipped, because not exists – "C:\Users\luc\Documents\GitHub\ESP3D-WEBUI\printer"
Could not find any items to permanently remove

remove-files-plugin@1.4.3:
The following items have been permanently removed:
  folders:
    dist\printer\languages
  files:
    dist\printer\index.html
    dist\printer\main.css
    dist\printer\main.js

Hash: 89230b224e226a518e5d
Version: webpack 4.43.0
Time: 7499ms
Built at: 09/05/2020 11:35:39 AM
          Asset      Size  Chunks                    Chunk Names
   ./index.html   404 KiB          [emitted]  [big]
./index.html.gz  83.7 KiB          [emitted]
       main.css   143 KiB       0  [emitted]         main
        main.js   261 KiB       0  [emitted]  [big]  main
Entrypoint main [big] = main.css main.js
 [2] ./src/components/app.js + 24 modules 110 KiB {0} [built]
     |    25 modules
 [3] ./src/components/dialog/index.js + 2 modules 8.49 KiB {0} [built]
     |    3 modules
 [4] ./node_modules/storeon/preact/index.js + 1 modules 9.09 KiB {0} [built]
     |    2 modules
 [9] ./src/components/printer/index.js + 28 modules 255 KiB {0} [built]
     |    29 modules
[11] ./src/languages/language-list.json 120 bytes {0} [built]
[14] ./src/index.js 1.31 KiB {0} [built]
[15] ./src/stylesheets/application.scss 39 bytes {0} [built]
[17] ./src/components/printer/store/index.js + 15 modules 15.5 KiB {0} [built]
     |    16 modules
    + 266 hidden modules

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  main.js (261 KiB)
  ./index.html (404 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (404 KiB)
      main.css
      main.js

WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = ./index.html
    [0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 503 bytes {0} [built]
    [2] (webpack)/buildin/global.js 472 bytes {0} [built]
    [3] (webpack)/buildin/module.js 497 bytes {0} [built]
        + 1 hidden module
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--4-1!node_modules/postcss-loader/src/index.js??ref--4-2!node_modules/sass-loader/dist/cjs.js??ref--4-3!src/stylesheets/application.scss:
    Entrypoint mini-css-extract-plugin = *
    [0] ./node_modules/css-loader/dist/cjs.js??ref--4-1!./node_modules/postcss-loader/src??ref--4-2!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/stylesheets/application.scss 145 KiB {0} [built]
        + 1 hidden module
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--4-1!node_modules/postcss-loader/src/index.js??ref--4-2!node_modules/sass-loader/dist/cjs.js??ref--4-3!src/stylesheets/components/printer/_printer.scss:
    Entrypoint mini-css-extract-plugin = *
       2 modules

> ESP3D-WebUI@3.0.0 build-grbl C:\Users\luc\Documents\GitHub\ESP3D-WEBUI
> cross-env NODE_ENV=production TARGET_ENV=grbl webpack --mode=production

remove-files-plugin@1.4.3:
Skipped, because not exists – "C:\Users\luc\Documents\GitHub\ESP3D-WEBUI\grbl"
Could not find any items to permanently remove

remove-files-plugin@1.4.3:
The following items have been permanently removed:
  folders:
    dist\grbl\languages
  files:
    dist\grbl\index.html
    dist\grbl\main.css
    dist\grbl\main.js

Hash: 8b6f74f4197389a0ae3d
Version: webpack 4.43.0
Time: 5706ms
Built at: 09/05/2020 11:35:48 AM
          Asset      Size  Chunks                    Chunk Names
   ./index.html   269 KiB          [emitted]  [big]
./index.html.gz  56.4 KiB          [emitted]
       main.css   141 KiB       0  [emitted]         main
        main.js   128 KiB       0  [emitted]         main
Entrypoint main [big] = main.css main.js
 [2] ./src/components/app.js + 28 modules 112 KiB {0} [built]
     |    29 modules
 [3] ./src/components/dialog/index.js + 3 modules 9.2 KiB {0} [built]
     |    4 modules
 [4] ./node_modules/storeon/preact/index.js + 1 modules 9.09 KiB {0} [built]
     |    2 modules
 [8] ./src/components/grbl/index.js + 6 modules 50.8 KiB {0} [built]
     |    7 modules
[10] ./src/languages/language-list.json 120 bytes {0} [built]
[13] ./src/index.js 1.31 KiB {0} [built]
[14] ./src/stylesheets/application.scss 39 bytes {0} [built]
[16] ./src/components/grbl/store/index.js + 9 modules 7.59 KiB {0} [built]
     |    10 modules
    + 274 hidden modules

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  ./index.html (269 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (269 KiB)
      main.css
      main.js

WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = ./index.html
    [0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 503 bytes {0} [built]
    [2] (webpack)/buildin/global.js 472 bytes {0} [built]
    [3] (webpack)/buildin/module.js 497 bytes {0} [built]
        + 1 hidden module
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--4-1!node_modules/postcss-loader/src/index.js??ref--4-2!node_modules/sass-loader/dist/cjs.js??ref--4-3!src/stylesheets/application.scss:
    Entrypoint mini-css-extract-plugin = *
    [0] ./node_modules/css-loader/dist/cjs.js??ref--4-1!./node_modules/postcss-loader/src??ref--4-2!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./src/stylesheets/application.scss 145 KiB {0} [built]
        + 1 hidden module
Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--4-1!node_modules/postcss-loader/src/index.js??ref--4-2!node_modules/sass-loader/dist/cjs.js??ref--4-3!src/stylesheets/components/grbl/_grbl.scss:
    Entrypoint mini-css-extract-plugin = *
       2 modules

> ESP3D-WebUI@3.0.0 build-lang C:\Users\luc\Documents\GitHub\ESP3D-WEBUI
> node ./src/languages/build.js

Building language packs for printer
No directory "./dist/printer/languages/"...
Building language packs for grbl
No directory "./dist/grbl/languages/"...
opening./src/languages/fr.json
opening./src/languages/zh_cn.json
No file: ./src/languages/printer/zh_cn.json
opening./src/languages/fr.json
opening./src/languages/zh_cn.json
No file: ./src/languages/grbl/zh_cn.json
gzipper: GZIP ->
gzipper: GZIP ->
gzipper: GZIP ->
gzipper: GZIP ->
gzipper: 1 file has been compressed.
Compressed files:  [
  'C:\\Users\\luc\\Documents\\GitHub\\ESP3D-WEBUI\\dist\\printer\\languages\\fr.json'
]
gzipper: 1 file has been compressed.
Compressed files:  [
  'C:\\Users\\luc\\Documents\\GitHub\\ESP3D-WEBUI\\dist\\grbl\\languages\\fr.json'
]
gzipper: 1 file has been compressed.
Compressed files:  [
  'C:\\Users\\luc\\Documents\\GitHub\\ESP3D-WEBUI\\dist\\printer\\languages\\zh_cn.json'
]
gzipper: 1 file has been compressed.
Compressed files:  [
  'C:\\Users\\luc\\Documents\\GitHub\\ESP3D-WEBUI\\dist\\grbl\\languages\\zh_cn.json'
]

C:\Users\luc\Documents\GitHub\ESP3D-WEBUI>

So I do not have any issue - I guess your installation of node has issue

You better redo full installation and may be also refresh the esp3d-webui sources as I have updated some package versions to remove security warnings recently

Also be noted that as mentioned before : you do not need to build anything if you do not change anything - the build index.html.gz is already done in dist/ directory (https://github.com/luc-github/ESP3D-WEBUI/blob/3.0/dist/printer/index.html.gz) only printer is currently usable - grbl version will come after

labotecno commented 4 years ago

seem its working ! with http://localhost:3000/ now how i can to put the last version on the esp32 with cam ? arduino or vscode? thank you esp3d webhost 3000

luc-github commented 4 years ago

1 - flash your board with ESP3.0 FW https://github.com/luc-github/ESP3D/tree/3.0 2 - upload webUI 3.0 (https://github.com/luc-github/ESP3D-WEBUI/blob/3.0/dist/printer/index.html.gz) when requested

Note: as explained here : https://github.com/luc-github/ESP3D-WEBUI/issues/112 camera UI is not ready - only test page is available

labotecno commented 4 years ago

i need to config the configaration.h ?

luc-github commented 4 years ago

yes you need to configure FW according your needs- the configuration.h has comments to explain each settings

royfocker19 commented 4 years ago

Hi Luc, do you think it could be possible to have some base configuration files (like in marlin) for most popular devices (esp32 cam diy more, si thinker, m5stack, etc)? I cannot make my camera work using the sample file on a esp32 cam from DIY More, and the problem maybe is related to pins, but also some sensors are enabled by default on esp32 firmware, causing reboot if not disabled.

luc-github commented 4 years ago

@royfocker19 the current 3.0 is in alpha stage - so configuration .h follow my status of features implementation final one will be basic and most feature will be disabled by default

Sample of several configurations.h is not planed in short term because too many user cases - but your problem may be the platformIO.ini, if you use it, or the flash settings, this will be addressed https://github.com/luc-github/ESP3D/issues/478 , but this is in esp3d FW not esp3d-webUI

labotecno commented 4 years ago

yes you need to configure FW according your needs- the configuration.h has comments to explain each settings

thank you for all step to make it working this implementation ! merci

luc-github commented 4 years ago

I plan to do some videos and docs, but this will be done end of beta when everything will be stable and defined clearly

luc-github commented 4 years ago

I guess issue can be closed now

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.