Git Product home page Git Product logo

Comments (23)

vialax avatar vialax commented on May 26, 2024 1

Hello,

I am using node.js v12.22.1 and node-red v1.3.4

I don't have the debug log anymore, but cleaning the cache and installing through CLI didn't work either.

I will try to get you the log.

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024 1

from node-red-contrib-smartnora.

andrei-tatar avatar andrei-tatar commented on May 26, 2024

@vialax Hi,
What version of node.js and node-red are you running?
Can you also upload the npm debug log?
How are you installing the package? palette manager? What if you use the shell?
Try running npm cache clean --force before installing the package.

from node-red-contrib-smartnora.

FireWizard52 avatar FireWizard52 commented on May 26, 2024

Hello @vialax

You wrote:

is the rpi1 too old to host the node red server with nora ?

I don't think that the RPI1 is too old, as I'm running Node Red version 1..3.4, NodeJS v 12.22.1 with Smart Nora 1.0.5 on a RPi 1B.

I recently had some issues with Smart Nora version 1.0.3, but that was caused, that I accidentally messed up my Node Red install.

See: https://discourse.nodered.org/t/smart-nora-1-0-3-installation-problem/44548

As you can see I installed version 1.0.3 on Node Red version 1.3.3.
Updated it later to 1.0.4 and also to 1.0.5.

Yesterday I updated Node Red to version 1.3.4 and NodeJS from v11.15 to v12.22.1
This tooks about 50 minutes, but it went without a problem.

So a Pi 1B is not the problem, if you have time :)

Regards

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

I tried installing the module through CLI, this is the result :

root@raspberrypi:# npm install --no-audit --no-update-notifier --no-fund --save --save-prefix= --production [email protected]
Killed .......] | extract:@types/node: sill extract @types/node@>=12.12.47 extracted to /root/node_modules/.staging/@types/node-2c875d8d (5607353ms)
root@raspberrypi:~#

The OS is installed on a 4Gb flash drive, with 1Gb+ free.

I'm trying to install it from the palette manager once again to get the log.

from node-red-contrib-smartnora.

FireWizard52 avatar FireWizard52 commented on May 26, 2024

Hi, @vialax

It looks that you try to install the modules as root from the CLI. I have no idea how many modules you already have installed as root. But this is not correct.
You can either install extra nodes (modules) from the palette or from the command line.

If you want to do it from the command line, go to your node red folder. On a Raspberry Pi this is the ~/.node-red.
This is a hidden file (mind the dot) in your home directory (normaly /home/pi)

Follow the procedure to re-install the node modules:

Colin wrote:

In fact, looking back at the start of the thread, it seems somehow your nodes have been messed up. You might be best to rename ~/.node-red/node_modules to something else and then (in the .node-red folder) run
npm install
That will re-install all the manually installed nodes again. Then, if it goes ok, restart node-red. Some nodes can take a long time to install on an old pi so don't worry if it sits for ten minutes apparently doing nothing.

See: https://nodered.org/docs/user-guide/runtime/adding-nodes

Check that the file package.json exists in the .node-red folder.

After installation restart your node-red

Regards

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

from node-red-contrib-smartnora.

FireWizard52 avatar FireWizard52 commented on May 26, 2024

Hello @vialax,

So I did what you said.

No, it looks that you only tried to install node-red-contrib-smartnora.

I didn't say that, at least it was not my intention to say that. So I might be a little unclear.

What I intended to say was that in the ~/.node-red folder you should rename your folder node_modules to something else.
And then in that directory execute the command npm install.

This should reinstall all the modules in correct folder.

If that is successful, you can restart node-red and then install node-red-contrib-smartnora, either from the palette or from the cli, but if you want to install from the cli, be sure you are in the directory ~/.node-red.

Maybe it will be simpler to reinstall the OS and node red.

I don't know. It might depend on what other applications has been installed on that Raspberry Pi.

If it is only the OS and Node-Red, I would do that.

Regards

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

from node-red-contrib-smartnora.

FireWizard52 avatar FireWizard52 commented on May 26, 2024

Hello @vialax

So fresh install of the OS this mornin, updated/upgraded and installed
nodered flawlessly using the bash script.

In this case you should have in your home directory (/home/pi) a hidden directory, called .node-red.
In this directory you will also find another directory, called node_modules.
If you enter this directory you will find node-red-contrib-smartnora and that is the only place where this module should be installed.

So far, what the end result should be.

"Googling" for the error:

error Unexpected end of JSON input while parsing near .......

points to a cache issue.

As earlier indicated by @andrei-tatar, execute: npm cache clean --force

Then enter your .node-red directory and execute: npm install node-red-contrib-smartnora

Regards

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

Fresh installed, tried through palette manager, CLI, still the same error :

pi@raspberrypi:/.node-red $ npm install --no-audit --no-update-notifier --no-fund --save --save-prefix= --production [email protected]
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/@firebase%2fauth reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-05-09T17_44_17_824Z-debug.log

Couldn't it be an issue on the https://registry.npmjs.org side ?

from node-red-contrib-smartnora.

FireWizard52 avatar FireWizard52 commented on May 26, 2024

Hello @vialax.

I searched for the error message and I found:

https://stackabuse.com/npm-error-failed-to-fetch-from-registry-when-installing-module/

Can you check?

And also this:

https://stackoverflow.com/questions/58154616/npm-err-fetcherror-request-to-http-registry-npmjs-org-webpack-dev-server-fai

Regards

from node-red-contrib-smartnora.

andrei-tatar avatar andrei-tatar commented on May 26, 2024

@vialax I would also check the card you're using on the pi, or try a different one. Judging on the various errors you're getting I think it's corrupting the files.

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

So, fresh install on another flash card, still no luck :

10 May 19:48:11 - [info] Installing module: node-red-contrib-smartnora, version: 1.0.5
10 May 19:54:41 - [warn] Installation of module node-red-contrib-smartnora failed:
10 May 19:54:41 - [warn] ------------------------------------------
10 May 19:54:41 - [warn] npm ERR! Unexpected end of JSON input while parsing near '...on":"1.8.1-canary.f0f'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-05-10T18_54_40_557Z-debug.log
10 May 19:54:41 - [warn] ------------------------------------------
Error: Install failed
at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/installer.js:214:23
10 May 19:54:41 - [error] Error: Install failed
Error: Install failed
at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/installer.js:214:23
10 May 19:54:42 - [error] Error: Install failed

Then another try :

10 May 20:33:45 - [info] Installing module: node-red-contrib-smartnora, version: 1.0.5
10 May 20:36:32 - [warn] Installation of module node-red-contrib-smartnora failed:
10 May 20:36:32 - [warn] ------------------------------------------
10 May 20:36:32 - [warn] npm ERR! Unexpected end of JSON input while parsing near '...-mocha":"1.3.0","karm'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-05-10T19_36_31_366Z-debug.log
10 May 20:36:32 - [warn] ------------------------------------------
Error: Install failed
at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/installer.js:214:23
10 May 20:36:32 - [error] Error: Install failed
Error: Install failed
at /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/installer.js:214:23
10 May 20:36:32 - [error] Error: Install failed

I tried to install the old nora palette, it went flawlessly :

10 May 19:55:35 - [info] Installing module: node-red-contrib-nora, version: 0.0.34
10 May 19:57:40 - [info] Installed module: node-red-contrib-nora
10 May 19:57:49 - [info] Added node types:
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-blinds
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-config
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-scene
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-speaker
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-switch
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-thermostat
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-outlet
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-light
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-garage
10 May 19:57:49 - [info] - node-red-contrib-nora:nora-lock

Still no way that the issue is server side ? Are your installations working without issues ?

from node-red-contrib-smartnora.

FireWizard52 avatar FireWizard52 commented on May 26, 2024

@vialax

No idea, what is wrong with your install. I had some issue, but they were not related to Smart Nora.
When it was solved Smart Nora 1.0.3 installed without any problem.
Later on, it has been upgraded to 1.0.4 and later to 1.0.5. No problems.

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

from node-red-contrib-smartnora.

andrei-tatar avatar andrei-tatar commented on May 26, 2024

Still no way that the issue is server side ? Are your installations working without issues ?

No, this issue is with installing the package (so probably npm related). What is weird to me is that each time the log is a bit different. Stackoverflow answers suggest that your cache is corrupt but I have no idea why it would keep getting corrupted.

https://stackoverflow.com/a/52249619/3016654
https://stackoverflow.com/a/50191315/3016654

from node-red-contrib-smartnora.

vialax avatar vialax commented on May 26, 2024

from node-red-contrib-smartnora.

andrei-tatar avatar andrei-tatar commented on May 26, 2024

Is it worth to try to get in touch with npm Devs ?

Might be. Is your RPi 1 power supply good and stable? Do you power anything over USB? Maybe that's why the files get corrupted?

from node-red-contrib-smartnora.

andrei-tatar avatar andrei-tatar commented on May 26, 2024

@vialax any updates on this issue? Did you manage to find the culprit?

from node-red-contrib-smartnora.

andrei-tatar avatar andrei-tatar commented on May 26, 2024

Closing due to inactivity.

from node-red-contrib-smartnora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.