I try to set fixed IP on a raspberry pi 4 with node js and if I run the following script with sudo
var networkconfig = require('network-config');
var my_net_cfg = {
ip: '192.168.1.15',
netmask: '255.255.255.0',
gateway: '192.168.1.1'
}
networkconfig.configure('eth0', my_net_cfg, function (err) {
console.log(err);
});
I get 'null' on console and the IP doesn't change.
Do I need to disable DHCP or something else on raspbian ??
Thanks!