I download the source code to my ubuntu and compiled it by myself and start it in the build folder ,I think it may not use configuration file,because I start it like this:
sudo ./lora_app_server --postgres-dns “postgres://loraserver_as:dbpassword@localhost/loraserver_as?sslmode=disable” --jwt-secret *************** --http-tls-cert /etc/lora-app-server/certs/http.pem --http-tls-key /etc/lora-app-server/certs/http-key.pem --db-automigrate --http-bind 0.0.0.0:8080
and my packet is like this:
{“applicationID”:“1”,“applicationName”:“mytest”,“deviceName”:“testnode
1”,“devEUI”:“0053415800000025”,“rxInfo”:[],“txInfo”:{“frequency”:******0
0000,“dataRate”:{“modulation”:“LORA”,“bandwidth”:125,“spreadFactor”:12
},“adr”:true,“codeRate”:“4/5”},“fCnt”:703,“fPort”:3,“data”:“UAA=”}
HI brocaar
First,thank you for your reply and thank you for your great works for this loraserver,and all my steps is followed below.
I used sudo git clone https://github.com/brocaar/lora-gateway-bridge.git sudo git clone https://github.com/brocaar/loraserver.git sudo git clone https://github.com/brocaar/lora-app-server.git
these three steps to download lora-gateway-bridge,loraserver and lora-app-server projects to my ubuntu PC.
then cd lora-gateway-bridge sudo make
after this step there is no error print out to the terminal and a new binary of lora-gateway-bridge came out to the “build” folder.then cd build sudo ./lora-gateway-bridge#this command launched the lora-gateway-bridge process
then cd loraserver sudo make
after this step there is no error print out to the terminal and a new binary of loraserver came out to the “build” folder.then cd build sudo ./loraserver --postgres-dns “postgres://loraserver_ns:dbpassword@localhost/loraserver_ns?sslmode=disable” --band XXXX --log-node-frames --net-id 010203 --db-automigrate --jwt-secret XXXXXXXX #this command launched the loraserver process
then cd lora-app-server sudo make
after this step there is no error print out to the terminal and a new binary of lora-app-server came out to the “build” folder.then cd build sudo ./lora_app_server --postgres-dns“postgres://loraserver_as:dbpassword@localhost/loraserver_as?sslmode=disable” --jwt-secret XXXXXXXXX --http-tls-cert /etc/lora-app-server/certs/http.pem --http-tls-key /etc/lora-app-server/certs/http-key.pem --db-automigrate --http-bind 0.0.0.0:8080 #this command launched the lora-app-server process
After all of these steps,I opened a firfox brower and input “https://localhost:8080” ,you already know the rest.
I followed your “LoRa Server documentation” to installed this lora server before at that time I can get the login UI correctly, so there is a history in my brower,but after I cleaned my history I can not get the login UI again.it always comes out that above webpage.
When we compile lora-app server, you have to be sure that there is no static files, you can delete them because the “make” will buld them again.
In case of to build the app of ui components, I have installed the react, i.e., you have to install your application also! After you install your react application you can even run the test with “npm start”. But to build the production static files, DO NOT RUN “NPM BUILD”! You have to compile all together! So every static files will be generated at correct places!
So when we run “make package package-deb GOOS=linux GOARCH=amd64”, you will have the .deb package, and thats all.
As brocaar said, be sure the you have installed correctly the ui requirements, understand a little how to even see the react app with the npm start and then build with make all together!
Hi @brocaar and @RogerioCassares ,thank you very much!
After run “make requirements ui-requirements” again,I can get the web-interface correctly now. I think
i need to get familiar with the npm more
I’ve removed the vendor/ folder from the git repository and moved the dependency management from govendor to dep.
The dependencies are now managed through a Gopkg.toml (containing the dependencies and desired version constraints) and Gopkg.lock (the current state, locked to a specific commit).
When executing make requirements the dep binary will be automatically installed after which dep ensure is called which will re-create the vendor/ folder matching the state of Gopkg.lock.
Installing UI requirements
loadDep:prop-types ▄ ╢████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:fsevents → 200 ▐ ╢█████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:fsevents → resolv ▐ ╢█████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine file-loader@1.1.5: wanted: {"node":">= 4.3 < 5.0.0 || >= 5.10"} (current: {"node":"4.2.6","npm":" loadDep:fsevents → header ▌ ╢█████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine react-dev-utils@5.0.0: wanted: {"node":">=6"} (current: {"node":"4.2.6","npm":"3.5.2"})
WARN engine extract-text-webpack-plugin@3.0.2: wanted: {"node":">= 4.8 < 5.0.0 || >= 5.10"} (current: {"node" loadDep:fsevents → fetch ▐ ╢█████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:fsevents → resolv ▐ ╢█████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine webpack@3.8.1: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current: {"node":"4.2.6","npm":"3.5.2 loadDep:jsx-ast-utils → a ▄ ╢████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:uuid → addNameRan ▀ ╢██████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:yargs → afterAdd ▐ ╢█████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:yargs → get ▌ ╢█████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine uglifyjs-webpack-plugin@0.4.6: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current: {"node":"4.2.6","npm":"3.5.2"})
> uglifyjs-webpack-plugin@0.4.6 postinstall /home/go/src/github.com/brocaar/lora-app-server/ui/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
sh: 1: node: not found
ui@0.1.0 /home/go/src/github.com/brocaar/lora-app-server/ui
├── acorn-dynamic-import@2.0.2 extraneous
├── autoprefixer@7.1.6 extraneous
├── babel-eslint@7.2.3 extraneous
├── babel-loader@7.1.2 extraneous
├── babel-preset-react-app@3.1.1 extraneous
├── bootstrap@3.3.7
├── bootswatch@3.3.7
├── case-sensitive-paths-webpack-plugin@2.1.1 extraneous
├── chart.js@1.1.1
├── codemirror@5.34.0
├── css-loader@0.28.7 extraneous
├── dotenv@4.0.0 extraneous
├── dotenv-expand@4.0.1 extraneous
├── enhanced-resolve@3.4.1 extraneous
├── escope@3.6.0 extraneous
├── eslint@4.10.0 extraneous
├── eslint-config-react-app@2.1.0 extraneous
├── eslint-loader@1.9.0 extraneous
├── eslint-plugin-flowtype@2.39.1 extraneous
├── eslint-plugin-import@2.8.0 extraneous
├── eslint-plugin-jsx-a11y@5.1.1 extraneous
├── eslint-plugin-react@7.4.0 extraneous
├── extract-text-webpack-plugin@3.0.2 extraneous
├── file-loader@1.1.5 extraneous
├─┬ flux@3.1.3
│ ├── fbemitter@2.1.1
│ └─┬ fbjs@0.8.16
│ ├── core-js@1.2.7
│ ├─┬ isomorphic-fetch@2.2.1
│ │ └─┬ node-fetch@1.7.3
│ │ ├─┬ encoding@0.1.12
│ │ │ └── iconv-lite@0.4.19
│ │ └── is-stream@1.1.0
│ ├─┬ promise@7.3.1
│ │ └── asap@2.0.6
│ ├── setimmediate@1.0.5
│ └── ua-parser-js@0.7.17
├── fs-extra@3.0.1 extraneous
├─┬ history@4.7.2
│ ├── invariant@2.2.2
│ ├─┬ loose-envify@1.3.1
│ │ └── js-tokens@3.0.2
│ ├── resolve-pathname@2.2.0
│ ├── value-equal@0.4.0
│ └── warning@3.0.0
├── html-webpack-plugin@2.29.0 extraneous
├── interpret@1.1.0 extraneous
├── jest@20.0.4 extraneous
├── json-loader@0.5.7 extraneous
├── leaflet@1.3.1
├── loader-runner@2.3.0 extraneous
├── mem@1.1.0 extraneous
├── moment@2.20.1
├── node-libs-browser@2.1.0 extraneous
├── postcss-flexbugs-fixes@3.2.0 extraneous
├── postcss-loader@2.0.8 extraneous
├── raf@3.4.0 extraneous
├─┬ react@16.2.0
│ ├── object-assign@4.1.1
│ └── prop-types@15.6.0
├─┬ react-chartjs@1.2.0
│ └── create-react-class@15.6.3
├── react-codemirror2@3.0.7
├── react-dev-utils@5.0.0 extraneous
├── react-dom@16.2.0
├── react-input-autosize@2.2.1
├─┬ react-json-tree@0.11.0
│ ├─┬ babel-runtime@6.26.0
│ │ ├── core-js@2.5.3
│ │ └── regenerator-runtime@0.11.1
│ └─┬ react-base16-styling@0.5.3
│ ├── base16@1.0.0
│ ├── lodash.curry@4.1.1
│ ├── lodash.flow@3.5.0
│ └── pure-color@1.3.0
├─┬ react-leaflet@1.8.0
│ ├── lodash@4.17.5
│ └── lodash-es@4.17.5
├─┬ react-router-dom@4.2.2
│ └─┬ react-router@4.2.0
│ ├── hoist-non-react-statics@2.3.1
│ └─┬ path-to-regexp@1.7.0
│ └── isarray@0.0.1
├─┬ react-select@1.2.1
│ └── classnames@2.2.5
├── style-loader@0.19.0 extraneous
├── sw-precache-webpack-plugin@0.11.4 extraneous
├── url-loader@0.6.2 extraneous
├── watchpack@1.4.0 extraneous
├── UNMET PEER DEPENDENCY webpack@1 || 2 || 3
├── webpack-dev-server@2.9.4 extraneous
├── webpack-manifest-plugin@1.3.2 extraneous
└── whatwg-fetch@2.0.3
npm WARN optional Skipping failed optional dependency /react-scripts/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.3
npm ERR! Linux 4.4.0-112-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! uglifyjs-webpack-plugin@0.4.6 postinstall: `node lib/post_install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the uglifyjs-webpack-plugin@0.4.6 postinstall script 'node lib/post_install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the uglifyjs-webpack-plugin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/post_install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs uglifyjs-webpack-plugin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls uglifyjs-webpack-plugin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/go/src/github.com/brocaar/lora-app-server/ui/npm-debug.log
Makefile:79: recipe for target 'ui-requirements' failed
make: *** [ui-requirements] Error 1
Nodejs version is v4.2.6. Does lora-app-server requires to newer jodejs version to be installed or there is quick uglifyjs-webpack-plugin0.4.6 fixing typo exist?
In that case, please try building using the Docker container first. If that works, you know it is related to your own development environment (outdated tools, packages, …).
the code of “migrations_gen.go” generated different.
As shown in the following figure.
The left use “go build cmd/lora-app-server” can not success.
it says "./main.go:217: undefined: migrations.AssetDir
./main.go:475: undefined: static.AssetDir
./main.go:476: undefined: static.AssetInfo
"
But the right one can success.
Does anyone come across this problem?
Thank you!