On the dev page https://developers.home-assistant.io/docs/en/frontend_development.html it teaches us how to set up a developer environment, but no matter how I try, it fails at the last part.
First thing is that it says to select the "right" nvm version. Which one? I don't have a clue. I tried with 10.0.0 and 11.6.0 (latest at time of writing). After that I should run script/bootstrap.
Well, this does well and it installs a crapton of packages and stuff, half of them with unmeet-peer-dependencies, but anyways, it finishes without error.
After that it says to build the frontend with script/develop, but it's there that it gives a error called gulp[12228]: src\node_contextify.cc:631: Assertion `args[1]->IsString()' failed. and no matter how many times I try to clean install or change nvm versions, nothing solves it.
If there's any solution to this, I would be very glad. I was about to fix some issues on the HA Frontend, but I now can't, I suppose.
I'm using Windows 10 x64 and the Bash output is below:
Valentino@DESKTOP-CAABV6I MINGW64 ~/Desktop/home-assistant-polymer (dev)
$ nvm install 10
10.0.0
Downloading node.js version 10.0.0 (64-bit)...
Complete
Creating C:\Users\Valentino\AppData\Roaming\nvm\temp
Downloading npm version 5.6.0... Complete
Installing npm v5.6.0...
Installation complete. If you want to use this version, type
nvm use 10.0.0
Valentino@DESKTOP-CAABV6I MINGW64 ~/Desktop/home-assistant-polymer (dev)
$ nvm use 10
10.0.0
Now using node v10.0.0 (64-bit)
Valentino@DESKTOP-CAABV6I MINGW64 ~/Desktop/home-assistant-polymer (dev)
$ script/bootstrap
yarn install v1.13.0
[1/4] Resolving packages...
warning Lockfile has incorrect entry for "fecha@^2.3.3". Ignoring it.
warning Resolution field "@webcomponents/[email protected]" is incompatible with requested version "@webcomponent
s/webcomponentsjs@^1.0.7"
warning Resolution field "@webcomponents/[email protected]" is incompatible with requested version "@webcomponent
s/webcomponentsjs@^1.0.7"
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "react@^15.3.0 || ^16.0.0".
warning " > [email protected]" has unmet peer dependency "react-dom@^15.3.0 || ^16.0.0".
warning "react-big-calendar > [email protected]" has unmet peer dependency "react@^0.14.9 || >=15.3.0".
warning "react-big-calendar > [email protected]" has unmet peer dependency "react-dom@^0.14.9 || >=15.3.0".
warning "react-big-calendar > [email protected]" has unmet peer dependency "react@>=0.14.0".
warning "react-big-calendar > [email protected]" has unmet peer dependency "react@>=0.11.0".
warning "react-big-calendar > react-overlays > [email protected]" has unmet peer dependency "react@>=0.14.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 112.87s.
Valentino@DESKTOP-CAABV6I MINGW64 ~/Desktop/home-assistant-polymer (dev)
$ script/develop
gulp[12228]: src\node_contextify.cc:631: Assertion `args[1]->IsString()' failed.
1: node::DecodeWrite
2: node::DecodeWrite
3: uv_loop_fork
4: v8::internal::interpreter::BytecodeDecoder::Decode
5: v8::internal::RegExpImpl::Exec
6: v8::internal::RegExpImpl::Exec
7: v8::internal::RegExpImpl::Exec
8: 000001E429F04281
Valentino@DESKTOP-CAABV6I MINGW64 ~/Desktop/home-assistant-polymer (dev)
Our nvmrc is pointing at Node 8.11.1, not 10.
Our nvmrc is pointing at Node 8.11.1, not 10.
Thank you, that was it.
The build was apparently successful(?), as I saw a lot of [built] in green and it then it stops on
Entrypoint app = app.js
Entrypoint authorize = authorize.js
Entrypoint onboarding = onboarding.js
Entrypoint core = core.js
Entrypoint compatibility = compatibility.js
Entrypoint custom-panel = custom-panel.js
Entrypoint hass-icons = hass-icons.js
Entrypoint service-worker-hass = service-worker-hass.js
[./src/entrypoints/app.js] 1000 bytes {app} [built]
[./src/entrypoints/authorize.js] 402 bytes {authorize} [built]
[./src/entrypoints/compatibility.js] 1.19 KiB {compatibility} {compat} [built]
[./src/entrypoints/core.ts] 2.21 KiB {core} [built]
[./src/entrypoints/custom-panel.js] 2.33 KiB {custom-panel} [built]
[./src/entrypoints/hass-icons.js] 33 bytes {hass-icons} [built]
[./src/entrypoints/onboarding.js] 106 bytes {onboarding} [built]
[./src/entrypoints/service-worker-hass.js] 3.67 KiB {service-worker-hass} [built]
[./src/layouts/app/home-assistant.js] 2.92 KiB {app} [built]
[./src/onboarding/ha-onboarding.js] 4.23 KiB {onboarding} [built]
[./src/resources/ha-style.ts] 7.91 KiB {app} {authorize} [built]
[./src/resources/hass-icons.js] 278 bytes {hass-icons} [built]
[./src/resources/html-import/polyfill.js] 11.2 KiB {app} {import-href-polyfill} [built]
[./src/util/custom-panel/load-custom-panel.js] 999 bytes {custom-panel} {panel-custom} [built]
[./src/util/custom-panel/set-custom-panel-properties.js] 242 bytes {custom-panel} {panel-custom} [built]
+ 1150 hidden modules
Child html-webpack-plugin for "authorize.html":
1 asset
Entrypoint undefined = authorize.html
[./node_modules/html-webpack-plugin/lib/loader.js!./src/html/authorize.html.template] 2.1 KiB {0} [built]
[./node_modules/raw-loader/index.js!./src/html/_header.html.template] ./node_modules/raw-loader!./src/html/_header.html.template 476 bytes {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 492 bytes {0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 546 bytes {0} [built]
+ 1 hidden module
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[./node_modules/html-webpack-plugin/lib/loader.js!./src/html/index.html.template] 3.33 KiB {0} [built]
[./node_modules/raw-loader/index.js!./src/html/_header.html.template] ./node_modules/raw-loader!./src/html/_header.html.template 476 bytes {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 492 bytes {0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 546 bytes {0} [built]
+ 1 hidden module
Child html-webpack-plugin for "onboarding.html":
1 asset
Entrypoint undefined = onboarding.html
[./node_modules/html-webpack-plugin/lib/loader.js!./src/html/onboarding.html.template] 2.13 KiB {0} [built]
[./node_modules/raw-loader/index.js!./src/html/_header.html.template] ./node_modules/raw-loader!./src/html/_header.html.template 476 bytes {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 492 bytes {0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 546 bytes {0} [built]
+ 1 hidden module
I read something earlier in the log that "webpack is watching file changes". So I think it's supposed to stop there and give a blinking cursor... But...
Is there a way to start a demo server without needing to upload it to hassio to run? I saw that in the "configuration.yaml" we should indicate the path on which the dev frontend is, but it's on a completely different computer (RPi 3 vs PC), so do we really need to reupload this every time to test?
I'm a little bit lost on this final step...
You should run a dev backend on the same machine and point it towards the frontend you are serving up. https://developers.home-assistant.io/docs/en/development_environment.html
You should run a dev backend on the same machine and point it towards the frontend you are serving up. https://developers.home-assistant.io/docs/en/development_environment.html
Ooh okay, I'll try that tomorrow.
Thanks to everyone for the useful help. I think I can close this issue now.
Most helpful comment
Our nvmrc is pointing at Node 8.11.1, not 10.