I'm trying to run this Node script on a couple of Raspberry Pis. It runs smoothly on the Pi3 but on a Pi Zero I get this error:
thread '<unnamed>' panicked at 'destination and source slices have different lengths', libcore/slice/mod.rs:695:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
I tried to run with RUST_BACKTRACE=1 node script.js but the error output is the same.
I've searched for hours how to run with RUST_BACKTRACE=1 to get some debug information but I find only discussions where is not specified how to use the command.
Both Raspberry boards have the last Raspbian Lite version installed and on the Pi Zero I have a fresh installation.
Related
I paid someone to install a Js script on my server
but when i tried making some changes on scripts/files i just couldnt see the changes on browser
while browsing and googling for like 24 hours i figured out that js scripts should be restarted in order to show the result on browser
and i figured out that in order to start a node js file i should type in terminal
node /dir/example.js
but can someone help me how to refresh/restart it
Iam stuck here like 24 hours
please help
I just want to let you know too that iam using Putty software in order to connect to the ubuntu server, ubuntu version is 20.04
EDIT: you will need an ssh connection to your server with access to a terminal..
Your node.js scripts, if they are on a server, should typically be ran using a process manager such as pm2.
Try to type pm2 list in a terminal. If you see some information you have hit the spot. Just after that run pm2 restart id. id being the number of your process and your changes should be visible.
You can just try this or try your luck with other process managers that run on your server providers. Just read what your server provider recommends for default and usually your previous developer would have used it.
I am facing this problem from last two weeks.
I am accessing and running server from puTTy terminal. Earlier i was facing problem that when i close my puTTy terminal the website showed 503 error, despite of using 'nohup' command.
nohup npm start --production &
Then i tried using 'Screen' , now if i close my terminal , the website is still live but after some hours (20-24) the Screen is dead and the server is also down.
Please give me a solution to run node.js app in production without the hassle of this 503 error
I tried to install Node.js Setup for the first time (node-v8.9.1-x64 and node-v9.2.0-x64) on a system running Windows 10 64-bit , but it is giving the dreaded error
Node.js Setup Wizard ended Prematurely
Failed Attempts
Launching .msi from Command Prompt ran as Administrator
Disabling the installation options
Performance Counters
Event Tracing
Online Document Shortcuts
Registry Key Search
No registry keys were found when running the following
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{793c9b44-3d6b-4f57-b5d7-4ff80adcf9a2}" /s
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{1e2e15d7-3760-470e-8699-b9db5248edd5}" /s
The installation log shows an error status: 1603. [View Installation Log]
Node is not installed
node -v
Output:
'node' is not recognized as an internal or external command, operable program or batch file.
Attempt 3
Tried the following based on Github issue #4329, but theres no output after running this.
msiexec /i node-v8.9.1-x64.msi /qn+ ADDLOCAL=ALL REMOVE=NodePerfCtrSupport,NodeEtwSupport
Any ideas how to solve this problem?
I am running Node.js and Socket.io for online chat.
I have created a file in:
/etc/init/example.conf
it has two lines:
start on startup
exec forever start /var/www/example.com/html/server.js //location of server file.
Whenever I start file upload in chat application, it crashes but instantly restarts.
Whenever I kill node process though, and start it manually - it works fine.
I also can't get any logs or anything from terminal as when it's auto started - it doesn't print me anything to terminal.
I am still new to Node.js and Linux in general.
Node.js is running on Express + Jade.
How do I determine specific cause?
I managed to solve my problem, after a bit of searching around I found out about tail command.
My issue was a bit harder to trace because Node.js was a process started by autostart so when I launched terminal and connected to server, process was just running in background basically and I wouldn't get any output (including exception messages).
Anyway, solution that worked for me was:
I typed
ps aux | grep node //to find PID of node process
then I went to following directory
cd /proc/[pid of running node service]/fd
In fd directory there are few objects you can get output from but if you want to attach and listen to servers output including uncaught exceptions, you need 1.
So:
tail -f 1
that way I was able to cause website to crash and see the output.
I am trying to run scripted editor on Windows XP and get could not connect to localhost:7261. There is same question here in Troubleshooting section. Suggestion is to delay running scripted for node to start. I delayed it with following batch script in bin/scripted.bat
start /MIN cmd /c node %rootdir%\server\scripted.js^>^>scripted.log
timeout /t 30
start "" "http://localhost:7261/editor.html?%patharg%"
I get the same error could not connect to localhost:7261.
How to configure scripted to run after node complete running?
I use scripted version 0.2.0 and node version 0.8.0-x86.
Often times the browser starts before the node server is running - just wait a second and press refresh.
If that fails, you'll find node isn't running. So you either don't have nodeJS installed, it's not on your PATH or it's not a new enough version.
Also, check scripted.log in the same folder as you ran scr from.