Nodejs throwing 'Illegal Instruction' w/ SQLite3 - node.js

I'm struggling to figure out what to do, please help. I have an embedded device (similar to a pi but not) running;
arm linux (armv5tejl).
node v0.10.44
npm v2.15.0
sqlite3 v3.8.3.1
I have a few problems and I've tried a slew of things, basically
npm install sqlite3
fails because the embedded board doesn't have make, I do have gcc 4.8.2. The reason I don't have make is because I cannot find the right .ipk package (using opkg). The versions of node and npm were all from opkg as well.
The closest version I could find of sqlite was node-v11-linux-arm and I think is the reason for the Illegal Instruction errors - instructions for a later version than my 5.
Any pointers on how to move forward? Thanks!

Related

Something went wrong installing the "sharp" module, on Mac M1

I had been trying to resolve this issue and had tried running the app via rosetta terminal, but same issue persists. I tried installing the sharp package globally but that to did not help.
Here is a snippet of the error :-
I think the issue is something related to Sharp package specific for the arm architecture
I was trying to setup a repo on my system locally and simply ran yarn dev. I expected the server to start but the same error keeps coming again and again .
I think your problem is related to this conversation: https://github.com/lovell/sharp/pull/3514
Specifically "On an M1/M2 based machine, the dylib files provided by a globally-installed vips (via Homebrew or otherwise) will be ARM64, therefore we cannot use these when running Node.js under x64 emulation as there will be a runtime conflict."

current, correct way to update nodejs and node-red on raspberry pi?

Attempting to update my three raspberry-pi NodeRed installations, I am getting these errors:
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node)
node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)
Any methods I have used have failed to install/update Node.js.
At this point I am fine with completely removing node-red and nodejs and re-installing from scratch.
So:
How can I correctly update Node.js and node-red at this point?
or
How can I completely remove node.js and node-red and start over?
EDIT:
PI - 2 Model B (BCM2835, rev a21041). Running Jessie 4.9.35v7+ 2017-07-05.
Running script from https://nodered.org/docs/getting-started/raspberrypi results in this error:
/dev/fd/63: line 298: syntax error near unexpected token `fi'
/dev/fd/63: line 298: ` fi'
This happened early on, and I went down a lot of side roads from various google searches, trying different approaches. Did not leave myself enough breadcrumbs to re-create exactly how I got here, unfortunately. I used scripts from different github sites using NPM or bash<-curl(my-version-of-update-nodejs-and-nodered).
The right way to both install and upgrade Node-RED on a Raspberry Pi is to use the install script linked to from the Node-RED install docs here.
This script will remove any current version of NodeJS and Node-RED and install the latest version that will work on the correct processor in the Pi (e.g. NodeJS don't formally ship a build that will run on a Raspberry Pi Zero anymore)

Electron build for windows shows sqlite3 error. But same build for Ubuntu Works

Packed using: Electron-Packager
Database: sqlite
The app uses Knex as a driver to query to mysqlite.
The module which it says that it cannot find is already present! But then too the error shows up.
I tried to navigate to the resource/app and then use commands like
npm run rebuild
tried installing python, node and then tried but seems like it required some CL.exe file so had to dowload Visual Studio C++ packages too but unfortunately it didn't have that file in my case.
Also tried
npm install sqlite3 --build-from-source
but got error
Can anyone help me with the exact steps to take? I also need help in knowing do i have to take this steps on the package that is already build or before i build it?
The best possible fix i got is the build the system in windows and then deploy it for windows. You need to google at every step where it breaks and then fix it. There are many possibilities and hence i cannot describe it here.

Node js in Linux Embedded

Hi I'm trying to install nodejs in a Pengwyn board (TI Sitara AM3354 ARM) after installing Yocto Linux successfully.
I don't know how to install node inside. I've tried opkg but it shows this error in the MiniCom:
opkg_install_cmd: Cannot install package <Packag name's>
I'm a bit frustrated and I don't know any page that can help me.
Any help will be apreciated,
The easiest solution is include nodejs before build image.
For include node, when you run hob, you must click on view packages and include nodejs.

Install bcrypt without Visual Studio

I'm trying to install bcrypt via npm and I'm getting a Failed at the bcrypt#0.7.8 install script. error.
I'm on Windows 8 x64, node ver 0.10.29.
Looking at bcrypt's dependencies tells me I need node-gyp, which apparently needs visual studio 2012 and python. For real? Do I really need to install a full IDE that I'm not going to use for this one node module?
Is it the compiler node-gyp is after, or some other small component from VS I can install that will do the trick?
Would love any suggestions for how to get this working with minimum possible extras.
As previously mentioned, you can install VC++ Express (and the Windows SDK) for free. However, if you are really that bothered by it, you could use a bcrypt API-compatible module that is implemented in pure javascript, however you will see a performance hit.
I should also note that there are many (useful) modules on npm right now that require compilation, so chances are you'll be getting more use out of the compiler (in the future) than you think.

Resources