Comments (3)
in your trace, you're using node v12.7.
use node v10.40 instead – spark-server
as of current status only runs on node v10.
this should resolve issues with the ursa
module.
https://community.particle.io/t/local-cloud-on-raspberry-pi/5708/69
from spark-server.
Several points for the Particle team:
- Is this documented somewhere? Chasing around different versions of NodeJS is a waste of time. A response in a bug report is not sufficient.
- Specify an engine in package.json and avoid this entire thread! http://blog.nodejitsu.com/package-dependencies-done-right/
- URSA versioning on Github is out-of-sync with NPM. How many other NPM packages like this?
- TDD
- NodeJS = fail. Java/Scala for the win.
from spark-server.
Actually, it will install and run under a newer version of NodeJS - just takes some TLC to make it work.
FWIW I've found it easiest to use "n" to switch between NodeJS versions. I've only tried the official repo and "n" versions of node. N makes it easy to switch versions.
I have spark-server running on NodeJS 4.2.2, NPM 2.14.7, Raspbian Wheezy. The keys to make this happen are this:
(optional) on an RPi I ran sudo rpi-update to update the RPi-v1 firmware. I basically followed the steps at https://github.com/Hexxeh/rpi-update, but I ran apt-get update and apt-get upgrade (sudo) first. Then the device was rebooted before proceeding.
- sudo apt-get update; sudo apt-get upgrade; sudo apt-get dist-upgrade (again, if just updated rpi firmware)
- sudo npm install -g n; n ls
- sudo n 4.2.2
- sudo apt-get install gcc-4.7 g++-4.7
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
- sudo update-alternatives --config gcc
- choose gcc version 4.7
- verify installation: gcc --version; g++ --version
Now install spark-server with npm --verbose -g install spark-server. However, it will fail until you make these edits:
- Edit dependency versions in spark-server/package.json
-- modify "dependencies": "ursa": "", "when": "", "moment": "", "xtend": "", "request": "*"
-- may also have to modify the stated version for express, ~3.4.4 works with this node/npm/node-gyp version
Also particle-cli installs and runs with this version of nodejs. To get this to happen I needed similar edits to package.json; and on Wheezy I built dfu-util from (github) source to obtain version 0.8.
FWIW - I'm not sure but I think the rumors/reports of problems with URSA and Crypto are due to V8 versions. NodeJS runs on V8. NodeJS v0.10 does not support ECMAScript6 because it only runs on an older V8 engine. NodeJS 0.12+ supports V8 engines with ECMA6 support. The V8V package is unreliable for investigating this.
They appear to run as they should, but !Proceed With Caution! I'm not 100% confident yet because I have to re-issue keys and reclaim photon.
Follow up: spark-server seems to work fine. BACKUP spark-server/user -- I ran into problems because I accidentally nuked it. Beware Express 4.x and node-oauth 2.x do not work in package.json without code-rework.
from spark-server.
Related Issues (20)
- OTA firmware update for Photons not working HOT 15
- Photons subscribed to SSEs do not return data HOT 1
- Subscribing to SSE using prefix filter does not work
- photon not works with the spark-server HOT 1
- Recommended Node.js version HOT 9
- Suggestion: safe mode healing / fleet management HOT 2
- SparkServer in production HOT 3
- Invalid CoAP version HOT 2
- Every time after "particle keys doctor core_id", "particle list" have no device which just added.
- Error: Invalid CoAP version HOT 5
- Not compatible with 0.5.x firmware HOT 1
- Subscribe does not work HOT 2
- device list is not udpated after addition of new Photon
- 0.6.0-rc.2 firmware no longer able to connect to spark-server HOT 8
- What are the features that are present only on the Particle cloud ? HOT 2
- How does this compare to the cloud server?
- Give this Repo some love :)
- Date Time format for DateTime Field HOT 1
- Photon handshake decryption error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark-server.