ha-dashboard icon indicating copy to clipboard operation
ha-dashboard copied to clipboard

Install scrip missing

Open Bastilms opened this issue 3 years ago • 6 comments

Hey, it seems the installation scrip is missing inside your package.json. I'm getting the following error: $ npm run install npm ERR! missing script: install npm ERR! A complete log of this run can be found in: npm ERR! ~/.npm/_logs/2021-03-12T01_52_07_175Z-debug.log

The debug log shows the following:

2021-03-12T01_52_07_175Z-debug.log

Bastilms avatar Mar 12 '21 02:03 Bastilms

Install isn't a script.

Just do npm i and then once complete npm run start

greghesp avatar Apr 04 '21 13:04 greghesp

Thank you. Then the Guide should be updated. However, the panel still doesn't work for me. Do I miss something? Do I need to adjust some settings in order for me to work? I added the panel as described to my Home assistant instance and the server is also able to access the main.js file. Unfortunately, it doesn't show anything.

Bastilms avatar Apr 05 '21 02:04 Bastilms

I'm now at a similar position.

If you're using SSL on HA, then this won't load in dev mode as you can't load unsecured content. I've tried routing it through ngrok using a secure connection, but also still having issues.

@william57m How did you get this to load in dev mode?

greghesp avatar Apr 05 '21 13:04 greghesp

OK, finally got this working: image

If you're developing, and using SSL, you'll need to use ngrok.

In webpack.config.js on line 5, you need to change const publicPath = isProd ? package.panelServingUrl : 'https://domain.ngrok.io/'; the dev url to be your https ngrok instance, otherwise it'll fail to load the resources to to XSS rejections. On line 54, and 55 of the config file, comment out the host and port lines.

This will get it running. You'll have to then inspect and modify the components to suit your own HA instance

greghesp avatar Apr 05 '21 14:04 greghesp

@greghesp Thank you for these tips. Unfortunately, I think I'm missing some core requirement. Does it show anything if I haven't adjusted any of the components? If so, it seems there is something broken on my side. The same also occurs when I upload the files to the server to avoid an issue with the connection.

Bastilms avatar Apr 05 '21 23:04 Bastilms

If you go into dev tools in Chrome, check the network tab to make sure it's loading correctly.

Then take a look at the console, change the target to the react panel and see what the errors are. I'm assuming you're just getting a blank page with no error popup? If so, it's likely that one of the components is pointing to a entity that doesn't exist for you

greghesp avatar Apr 06 '21 06:04 greghesp