callback - [optional] A function to be called while the softdevice is uninitialised. Use with caution - accessing console/bluetooth will almost certainly result in a crash.
you managed to actually do both things advised not to do :-)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
you should not do the initialization of services inside NRF.restart(), that's meant for code that runs while bluetooth stack is completely disabled
https://www.espruino.com/Reference#l_NRF_restart
you managed to actually do both things advised not to do :-)