Added the Ikea dimmer to the nodes

i will try the red node editor for new nodes when i get this back up and running

Okay, instead of using 127.0.0.1, use the IP address of the machine that node-red is on. I think this may help.

1 Like

it worked fine on 127.0.0.1:1880 yesterday until i downloaded a module between node red tutorials. now im on install 4 with differnt issues every time, The survey stated 26.7% of Windows 10 users,thats around 220 windows 10 users in the poll, however i'm of the opinion that its not for windows at all, what operating system do you run Node Red

Look it is a voluntary survey, there could be 1 million windows 10 users and we wouldnt know it if they did not participate in the survey.

I gave you a suggestion:

node-red-restart
Watch the output.

Because you are on windows, you need to use node-red on the commandline instead and watch it.
I am pretty sure you receive errors when node red is started.

with the "suggested use of" powershell in admin i get,
this automaatically provides a choice of file extemsions and the cmd is chosen

node-red-pi.cmd : The system cannot find the path specified.
At line:1 char:1

  • node-red-pi.cmd
  •   + CategoryInfo          : NotSpecified: (The system cann...path 
                                specified.:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    
    

with the cmd window with admin io get:

C:\WINDOWS\system32>node-red
25 Feb 11:37:37 - [info]

Welcome to Node-RED

25 Feb 11:37:37 - [info] Node-RED version: v1.0.3
25 Feb 11:37:37 - [info] Node.js version: v12.16.1
25 Feb 11:37:37 - [info] Windows_NT 10.0.18363 x64 LE
25 Feb 11:37:40 - [info] Loading palette nodes
25 Feb 11:37:41 - [error] Failed to start server:
25 Feb 11:37:41 - [error] TypeError: Cannot read property 'forEach' of undefined
at Object.addModule (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\registry.js:186:27)
at C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\loader.js:108:30
at tryCatchReject (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
at runContinuation1 (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
at Fulfilled.when (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
at Pending.run (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
at Scheduler._drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
at processTicksAndRejections (internal/process/task_queues.js:79:11)

Can I ask why you're running node-red from an elevated command prompt? The default starting directory for a regular prompt is the C:\Users\... folder iirc, but for elevated prompts it defaults to system32.

with the powershell in admin the cmd option is the :slight_smile:PS C:\WINDOWS\system32> node-red.cmd
25 Feb 11:42:00 - [info]

PS C:\WINDOWS\system32> node-red.cmd
25 Feb 11:42:00 - [info]

Welcome to Node-RED

25 Feb 11:42:00 - [info] Node-RED version: v1.0.3
25 Feb 11:42:00 - [info] Node.js version: v12.16.1
25 Feb 11:42:00 - [info] Windows_NT 10.0.18363 x64 LE
25 Feb 11:42:02 - [info] Loading palette nodes
25 Feb 11:42:02 - [error] Failed to start server:
25 Feb 11:42:02 - [error] TypeError: Cannot read property 'forEach' of undefined
at Object.addModule (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\registry.js:186:27)
at C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\loader.js:108:30
at tryCatchReject (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
at runContinuation1 (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
at Fulfilled.when (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
at Pending.run (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
at Scheduler._drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
at processTicksAndRejections (internal/process/task_queues.js:79:11)

PS C:\WINDOWS\system32>

How did you install node-red ?
and the question from @afelix was: why do you run node-red from an admin powershell ?

@dougcr4 Why did you post this in two different threads?

just fatigue

After reading through this: my recommendation is to delete your current install; and then install a clean version with no modules. Make sure that is working with Hello World or whatever; and then install and test one module at a tine via the editor only as described in an earlier reply.

Ive been reinstalling since sunday evening:
heres my latest attempt:-
run Apps & features and uninstall Node.js
Python 2.7.17 is installed. C:\Python27
A local disc Q has been installed and remains????
Cygwin64 is also installed C:\cygwin64
Build tools are installed C:\Users\Dell.windows-build-tools
C:\Users\Dell.node-red is now deleted, as all folders are empty
open firefox browser
open up https://nodered.org/
Get Sarted Button
Run Locally Option/getting started
Running Locally(installing Node Red on your local computer)
If you are using Windows, do not start the command with sudo.
More information about installing Node-RED on Windows can be found here.
Click on here button
It is recommended to use PowerShell
goto Node.js homepage
download 12.16.1
windows explorer open up downloads folder
install node-v12.16.1-desktop-amd64
tick box for auto install of tools and chocolatery
click finish
Cmd screen hit any key to continue
this opens up Administrator power shell
the poweshell provides
WARNING: It's very likely you will need to close and reopen your shell
before you can use choco.
and
WARNING: You can safely ignore errors related to missing log files when
upgrading from a version of Chocolatey less than 0.9.9.
'Batch file could not be found' is also safe to ignore.
'The system cannot find the file specified' - also safe.
WARNING: Not setting tab completion: Profile file does not exist at
'C:\Users\Dell\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
and
Chocolatey upgraded 0/2 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
touch keyboard and administrator powershell closes.
back to firefox
https://nodered.org/docs/getting-started/windows

Using Powershell: node --version; npm --version
{{{i have previously used administrator powershell as well at
this point to see if the install worked}}}
so onto powershell
insert/paste the following: node --version; npm --version
this returns
v12.16.1
6.13.4
onto the powershell
PS C:> node-red
25 Feb 18:47:23 - [info]

Welcome to Node-RED

25 Feb 18:47:23 - [info] Node-RED version: v1.0.3
25 Feb 18:47:23 - [info] Node.js version: v12.16.1
25 Feb 18:47:23 - [info] Windows_NT 10.0.18363 x64 LE
25 Feb 18:47:25 - [info] Loading palette nodes
25 Feb 18:47:26 - [error] Failed to start server:
25 Feb 18:47:26 - [error] TypeError: Cannot read property 'forEach' of undefined
at Object.addModule (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\registry.js:186:27)
at C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\loader.js:108:30
at tryCatchReject (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:845:30)
at runContinuation1 (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:804:4)
at Fulfilled.when (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:592:4)
at Pending.run (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\makePromise.js:483:13)
at Scheduler._drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (C:\Users\Dell\AppData\Roaming\npm\node_modules\node-red\node_modules\when\lib\Scheduler.js:27:9)
at processTicksAndRejections (internal/process/task_queues.js:79:11)

in the task scheduler library :-

node red start up / Ready / At system startup / created 24/02/20

firewall and security off

127.0.0.1:1880 / localhost:1880 unable to connect

Installing Node.js Windows Build Tools

goto powershell as an Administrator:

npm install --global --production windows-build-tools

this returns

l --production windows-build-tools
npm : npm WARN deprecated request@2.88.2: request has been deprecated, s
ee https://github.com/request/request/issues/3142
At line:1 char:1

  • npm install --global --production windows-build-tools
  •   + CategoryInfo          : NotSpecified: (npm WARN deprec...est/issues/3142:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    
    

windows-build-tools@5.2.2 postinstall C:\Users\Dell\AppData\Roaming\npm\node_modules\windows-build-tools
node ./dist/index.js

Downloading vs_BuildTools.exe
[> ] 0.0% (0 B/s)
e[1000De[0Ke[1Ae[1000De[0Ke[1Ae[1000De[0KDownloading vs_BuildTools.exe
[> ] 0.0% (0 B/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\Dell.windows-build-tools\vs_BuildTools.exe.

Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!

Status from the installers:
---------- Visual Studio Build Tools ----------
Still waiting for installer log file...
------------------- Python --------------------
Python 2.7.17 is already installed, not installing again.e[1000De[0Ke[1Ae[1000De[0Ke[1Ae[1000De[0Ke[1Ae[1000De[0K---------- Visual Studio Build Tools --------

Successfully installed Visual Studio Build Tools.
------------------- Python --------------------
Python 2.7.17 is already installed, not installing again.

Now configuring the Visual Studio Build Tools..

All done!

  • windows-build-tools@5.2.2
    updated 2 packages in 21.4s
    closing admin powershell and opening powershell
    no change with program status

been going round and round this for a few days now varying anything that might change the
install failure.

I was getting the same results from anywhere on the c drive directory

I also have ran this issue on both powershell and powershell ISEwith user and administrator privaledges, just to see if ths was the answer

Where do you get these instructions from?

https://nodered.org/docs/getting-started/local

that was the info url

Perhaps because your story is barely readable.

Where did you do npm install -g --unsafe-perm node-red ?

This is also being discussed here: Windows 10 [error] Failed to start server: [error] TypeError: Cannot read property

Given this topic is no longer about the IKEA Dimmer node, please use that other thread for the more general windows install issue.

Running windows note:
Note : Some of the following instructions mention the "command prompt".
Where this is used, it refers to either the Windows cmd or PowerShell
terminal shells. It is recommended to use PowerShell on all newer versions
of Windows as this gives you access to commands and folder names that are
closer to those of Linux/Mac.
As far my as experience with node red stretches to, this note should be ammended.

It is recommended to use PowerShell on all newer versions
of Windows, but when its essential to use the command prompt
this should be highlighted
Q what powershell and with std or admin rights is not defined
Q Powershell
or Powershell ISE
or powershell ISE (x86)
however its best not to use powershell instead of
CMD, for the entire install.
If you are not using the windows task scheduler to start node-red
using the Powershell wont start Node-Red its only aceptable if I use the cmd window.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.