hassio-addons / addon-node-red

Node-RED - Home Assistant Community Add-ons
https://addons.community
MIT License
524 stars 120 forks source link

SyntaxError on fresh install #43

Closed disrupted closed 5 years ago

disrupted commented 5 years ago

Problem/Motivation

(Why the issue was filed)

Expected behavior

successful first startup

Actual behavior

crashes with Syntax Error

Steps to reproduce

System: Raspberry Pi 3 HassOS 1.11 HA 0.79.1 SU 131 Node-RED addon 0.7.0

log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Node-RED v0.7.0
 Flow-based programming for the Internet of Things
 From: Community Hass.io Add-ons
 By: Franck Nijhof <frenck@addons.community>
-----------------------------------------------------------
 armhf / HassOS 1.11 / HA 0.79.1 / SU 131 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
INFO: Password is NOT in the Have I Been Pwned database! Nice!
INFO: Password is NOT in the Have I Been Pwned database! Nice!
INFO: Password is NOT in the Have I Been Pwned database! Nice!
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 11-warning.sh: executing... 
[cont-init.d] 11-warning.sh: exited 0.
[cont-init.d] 20-config.sh: executing... 
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 30-auto-api-token.sh: executing... 
INFO: API token is incorrect in the Node-RED configuration, fixing...
[cont-init.d] 30-auto-api-token.sh: exited 0.
[cont-init.d] 80-system-packages.sh: executing... 
[cont-init.d] 80-system-packages.sh: exited 0.
[cont-init.d] 81-npm-packages.sh: executing... 
[cont-init.d] 81-npm-packages.sh: exited 0.
[cont-init.d] 82-user-scripts.sh: executing... 
[cont-init.d] 82-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/usr/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:1
(function (exports, require, module, __filename, __dirname) { """Module containing a memory memory manager which provides a sliding window on a number of memory mapped files"""
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected string
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/readable-stream/readable.js:12:30)
/usr/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:1
(function (exports, require, module, __filename, __dirname) { """Module containing a memory memory manager which provides a sliding window on a number of memory mapped files"""
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

config.json

{
  "log_level": "info",
  "credential_secret": "supersecret",
  "users": [
    {
      "username": "disrupted",
      "password": "supersecret",
      "permissions": "*"
    }
  ],
  "http_node": {
    "username": "disrupted",
    "password": "supersecret"
  },
  "http_static": {
    "username": "disrupted",
    "password": "supersecret"
  },
  "port": 1880,
  "ssl": false,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_ssl": false,
  "system_packages": [],
  "npm_packages": [],
  "init_commands": []
}

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

addons-assistant[bot] commented 5 years ago

:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

frenck commented 5 years ago

I'm unable to reproduce this issue.

Is this still a problem @disrupted?

disrupted commented 5 years ago

yes, it is unchanged. Since no one else seems to have run into this issue is there a way to completely purge all nodeRED-related data and reinstall the container from scratch?

frenck commented 5 years ago

@disrupted Add-on version 1.0.0 has been released. Please try that one. In case this still is an issue, be sure to delete the /config/node-red folder and try again.

disrupted commented 5 years ago

can confirm, 1.0.0 resolves my issues. thanks !

frenck commented 5 years ago

Thanks for letting me know @disrupted!

addons-assistant[bot] commented 5 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.