Big Timer won't allow node red to start

Just started getting the following error. I was able to uninstall Big Timer to get back into Node Red but reinstalling causes the issue again.

Welcome to Node-RED
===================
10 Feb 09:53:17 - [info] Node-RED version: v0.19.5
10 Feb 09:53:17 - [info] Node.js  version: v8.14.0
10 Feb 09:53:17 - [info] Linux 4.14.81-v7 arm LE
10 Feb 09:53:18 - [info] Loading palette nodes
10 Feb 09:53:25 - [info] Settings file  : /etc/node-red/config.js
10 Feb 09:53:25 - [info] Context store  : 'default' [module=memory]
10 Feb 09:53:25 - [info] User directory : /config/node-red/
10 Feb 09:53:25 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Feb 09:53:25 - [info] Flows file     : /config/node-red/flows.json
10 Feb 09:53:25 - [info] Server now running at https://127.0.0.1:1880/
10 Feb 09:53:25 - [info] Starting flows
10 Feb 09:53:26 - [info] Started flows
10 Feb 09:53:28 - [red] Uncaught Exception:
10 Feb 09:53:28 - TypeError: Cannot read property 'getHours' of undefined
    at bigTimerNode.<anonymous> (/config/node-red/node_modules/node-red-contrib-bigtimer/bigtimer.js:205:23)
    at emitOne (events.js:116:13)
    at bigTimerNode.emit (events.js:211:7)
    at Timeout._onTimeout (/config/node-red/node_modules/node-red-contrib-bigtimer/bigtimer.js:866:9)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hassio-addon-node-red@ start: `node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hassio-addon-node-red@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-02-10T16_53_28_073Z-debug.log
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
1 Like

Managed to get big time uninstalled but now get the following error.

[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... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-config.sh: executing... 
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 50-remove-conflicts.sh: executing... 
audited 80 packages in 4.977s
found 0 vulnerabilities
[cont-init.d] 50-remove-conflicts.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... 
> [email protected] install /opt/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v57-linux-arm-musl.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, musl) (falling back to source compile with node-gyp) 
gyp ERR! build error 
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.14.81-v7
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/opt/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/opt/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /opt/node_modules/bcrypt
gyp ERR! node -v v8.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/opt/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.14.81-v7
node-pre-gyp ERR! command "/usr/bin/node" "/opt/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /opt/node_modules/bcrypt
node-pre-gyp ERR! node -v v8.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/opt/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
removed 1 package and audited 2159 packages in 42.789s
found 2 vulnerabilities (1 low, 1 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details
[cont-init.d] 82-user-scripts.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
1 Like

Same problem.
I removed node-red installed to do some testing

1 Like

Same here. Iā€™m stuck.

Iā€™m unable to start node-red so I canā€™t remove BigTimer. When I try and save changes I get:

deploy failed: not authorized

Not sure how to proceed. Iā€™d like to go edit the flows Iā€™ve created to remove BigTimer, but I donā€™t know how to get to the file.

It seems to be an issue that is recognized: Node-Red continually fails and restarts - #16 by Colin - General - Node-RED Forum

I found the solution here: Bigtimer version 2.1.4 Ā· Issue #128 Ā· hassio-addons/addon-node-red Ā· GitHub

Add this to the node-red config:

ā€œnpm_packagesā€: [
ā€œ[email protected]ā€
],

This forces the node-red to use an earlier version of BigTimer that works.

4 Likes

I have the exact same problem. What you need to do to delete the bigtimers is the following:

Make a backup of flows.json
Open flows.json in a text editor like notepad++
On the beginning of the line with flows each tab should be defined as:
{"id":"b00b1dda.40a67","type":"tab","label":"Lighting","disabled":false,"info":""}

For each tab, set disabled to ā€˜trueā€™. Then save and restart node-red. You should be able to disable the bigtimers and re-enable the tabs using the gui.

EDIT: By enabling the old bigtimer package this solution should not be needed

Thank you @Jasperhb!

Thank you - sorted the problem for me!

Same problem here, and solution worked for me as well.
I assume updating to NodeRed 1.3.0 was the cause. I just checked this morning and I see that NodeRed 1.3.1 is available and it mentionsā€¦
Full Changelog

Changed

  • Updates node-red-contrib-bigtimer to v2.1.6 (#130)

sounds like a node module issue maybe?

Try running npm audit in your node-red project to see if there are any node issues.