Thingsboard Not building from Source - maven

I have a new ubuntu 16.04 Virtual machine that I'm attempting to install thingsboard on using this documentation Contribution Guide and am not having any success:
This is what did did on the machine:
sudo apt-get install default-jre default-jdk
Export JAVA_HOME='/usr/lib/jvm/default-java'
git clone https://github.com/thingsboard/thingsboard.git
git checkout release-1.3
cd ${TB_WORK_DIR}/application
mvn clean install -DskipTests
Modified cd ${TB_WORK_DIR}/application/target/bin/install/install_dev_db.sh to my user and executed script.
I would like to use HSQLDB at the moment.
cd ${TB_WORK_DIR}/application
mvn clean install -DskipTests
Results:
NPM server starts but when I log onto localhost:3000 and attempt to login with tenant#thingsboard.org / tenant, I get the error
[Error API proxy error: Error connect ECONNREFUSED 127.0.0.1:8080]
I've triple checked that I do not have a typo.
Am I missing a step?
I'm not using a proxy and received the same error as above:
npm config set proxy null
npm config set https-proxy null npm config
npm config set registry http://registry.npmjs.org/
cat ~/.npmrc:
proxy=null
https-proxy=null
registry=http://registry.npmjs.org/ls

As you noted, this is the same as thingsboard/thingsboard issue 336...
with the only tip being:
I think you need the backend running in order to be able to log in.
Either you are behind a proxy
npm config set proxy http://myproxyblabla:myport
npm config set https-proxy http://myproxyblabla:myport
Or you are not, meaning your localhost thingsboard system should not use a proxy at all:
npm config set proxy null
npm config set https-proxy null
In both cases:
npm config set registry http://registry.npmjs.org/
Then try again to re-start your server and to log on.

Try this
1- make sure you have java 8 (JDK not JRE) ,
2- Run "mvn clean install -DskipTests" from root directory (not application directory)
3- hit 127.0.0.1:8080 not :3000 (this one if you build from UI folder)

Related

I try to install my dependencies but I got a error

i tried to install dependencies of my program and I get a error when execute yarn install on linux os
i execute "yarn install or sudo yarn install" a i get the next error:
An unexpected error occurred: "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz: connect EACCES 2606:4700::6810:1523:443"
any ideas?
Turn off the strict-ssl on yarn/npm config, and try again
yarn config set "strict-ssl" false -g
or
npm config set "strict-ssl" false -g
or
yarn config set registry https://registry.npmjs.org
try these and then tell me if it worked or not and if solved please accept the answer
finnaly was only firewall rule of ubuntu.
sudo ufw allow 443

Trouble Installing IPFS

I am using the instructions given on their site for MacOS- https://ipfs.io/docs/install/#installing-with-ipfs-update
[tutorial][1]
To build demo, clone this repo and run the following command:
$ cd contracts
$ npm install
Running the demo
To run demo, first run testrpc by running:
$ testrpc
Then compile and deploy the solidity contracts:
$ truffle compile
$ truffle migrate
Run an instance of IPFS to enable uploads:
$ ipfs daemon
Finally to build website, run:
$ npm run dev
I reached this last step (npm run dev) and I got an error message saying "npm missing scripts dev"
I am in the contracts directory specified, and installed everything there properly I believe. However, I don't see any dev script in the json package(s) which I believe could be being referenced using the npm run dev command. May this be the problem?
Here are the files wihin the folder contracts-master
app
index.html
javascripts
stylesheets
contracts
**ethpm.json** This one?
img
LICENSE
Lockup.sol
migrations
**package.json** Or this one?
Readme.md
scripts
coverage.sh
coveralls.sh
install.sh
test.sh
truffle.js
Any help / suggestions / learning resources would be appreciated.
Thanks for your time,
Elias
Your error is not because of ipfs. You are running dev mode but error saying that you don't have any scripts dev.If you are deploying smart contracts then you don't need ipfs demon. check package.json
"scripts": {
"dev": "command to run service"
}
Your package.json don't have dev scripts recheck package.json

Getting ETimedOut error when trying to install packages using npm in windows

I'm facing this "ETimedOut" error when trying to use this command "npm install -g yo" .Actually I'm using a network proxy to access internet.
I got a warning message that "If u are behind a proxy,please make sure that 'proxy' config is set properly ".
Can anyone please help me out regarding this issue.
You can set the npm proxy config parameter using these commands:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Source

Laravel Forge deployment script fails with 'command not found'

Quick explanation: I have a staging and a production server, both with the same deployment script (the only difference is the repo branch the clone). The deployment script runs bower install which is globally installed on both servers.
To install it globally I changed npm config set prefix to /home/forge/.npm-packages and afterwards ran npm install -g bower (note sudo wasn't needed, that's the point of changing the prefix). Once again, this was done in both servers.
When I ssh into each server, and run bower -v, which bower it is clear the command DO exist, and it IS added to PATH env. It is the same output for both servers.
Manually running bower install on the project root works for both server.
The issue is the forge deployment script, which only fails on production (IKR? I don't know what was I expecting).
The actual output is:
/home/forge/.forge/provision-2394191.sh: line 8: bower: command not found
The interesting part is, in my attempt to debug, I manually ran provision-2394191.sh and it worked.
What is wrong with my production server?
Seems like adding the new /home/forge/.npm-packages to the $PATH using export was not enough. To solve this I had to manually add it to the /etc/environment file.

ETIMEDOUT Error while installing Node packages on Windows

I am trying to install node packages on my windows machine using npm from a fresh install of node.
however, I am getting ETIMEDOUT errors. I checked few other stackoverflow questions with similar problem and almost all of them are related to problems when behind a proxy. Same is not the case with me. My system is not behind any proxy server. Can someone help me with resolving it.
PS C:\windows\system32> npm -v
2.5.1
PS C:\windows\system32> npm install bower -g
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i
nstall" "bower" "-g"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect
npm ERR! network connect ETIMEDOUT
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! C:\windows\system32\npm-debug.log
I am posting this answer in case some one faces the same issue.
I was able to solve this by running following command:
npm config delete proxy
First, run
npm config list
and check whether you are behind a proxy. If so, try running
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy
as required
**If this method did not work, reinstall nodejs.
I tried all the suggested solutions I could find on GitHub forums and StackOverflow topics. Finally disabling my router's firewall solved the issue immediately.
I am using Windows 10, node 4.0.0 and npm 2.13.4.
First see the npm config list:
npm config list
If you don't find http-proxy, https-proxy and proxy correctly set, then
You need to configure npm to work with your web proxy. For example:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
npm config set http-proxy http://proxy.company.com:8080
Not on Windows but it can help there as well.
Node 16 worked, Node 18 did not. Turns out it was related to IPv6. As soon as I disabled IPv6 the connection did not timeout any more. The target registry was a Nexus server.
You can try to throttle the number of simultaneous connections with the following command (for example 3 maximum simultaneous connections):
npm set maxsockets 3
The CLI has been allowing this option since npm#3.8.0. The default is 50 simultaneous connections max. See this link for further reference.
If removing the npm proxy config settings (or correctly setting them, if that is necessary for you) did not fix it, then This github issue discusses what might be happening. My summary is that for some reason the ipv6 dns resolution to the registry is not resolving correctly and seems to be randomly failing for people.
My command was fetching from registry.npmjs.org using npm 9.1.2 and node 18.12.1 - I was running this from a windows terminal via vscode.
I ended up disabling ipv6 via the network properties of my adapter see here
Again, changing the npm config proxy settings did not resolve anything for me. I re-enabled ipv6 after my command finished.
For people working in corporates (where you cannot delete or edit the proxy configuration of the organization):
There must be an .npmrc file in your users folder. If not, you can create one. This file can be edited to register the proxy settings of your organization. Contact your organization's IT team to get the relevant proxy details.
Example of the .npmrcfile contents for my organization:
strict-ssl=false
registry=https://nexus.com/nexus/content/groups/npm-read/
proxy=http://primary-proxy.gslb.intranet.com:8080/
https-proxy=http://primary-proxy.gslb.intranet.com:8080
This file can be found in your users folder:
I was not able to install any packages before because of this error then after 1 hour, I finally resolved it because I was not behind a proxy but the proxy parameters got set in the npm config thats why that error was showing.
I'am posting it because if anyone is facing the same issue and if they are not behind any proxy then they can use the following commands:-
npm config rm proxy
npm config rm https-proxy
npm config delete http-proxy
npm config delete https-proxy
set HTTP_PROXY=null
set HTTPS_PROXY=null
One way to resolve this is to set Fiddler as your proxy server. This probably only works for windows.
Running Fiddler, type these commands:
npm config set proxy http://localhost:8888
npm config set https-proxy http://localhost:8888
Before you do this, Rules -> Automatically Authenticate
I solved with:
npm config set proxy null
I solved it with the following:
npm config rm proxy
npm config rm https-proxy
npm config delete http-proxy
npm config delete https-proxy
set HTTP_PROXY=null
set HTTPS_PROXY=null
I was going through the same error. the root cause was the proxy settings : there are several answers provided in here to reset the proxy but none of them worked for me.
Below commands solved my problem, give them a try.
npm config rm proxy
npm config rm https-proxy
If none of the mention solutions works for you then, try switching your node version.
I tried to implement all solutions and suggested commands for npm and yarn but it's not resolved.
When I disable my VPN and try to "yarn install, " it will work fine.
After all the effort with no result, I reboot my router and it works!
On windows 10, adding Node.js to the firewall authorized applications AND restarting the laptop solved the problem.
I also face this issue
Solution
Just uninstall Node.js .
uninstall its package also which you downloaded from website.
Download Node.js from website.
Reinstall Node.js .
It will Work.

Resources