Hi, if you are developing custom BL and you run npm run debug -> and then you want to perform change, you have to close connection, save file and then run it again…and usually i got error that another instance is running, i have to wait or manually remove that instance using portal. SO my question is, if you are not planning to make like “livereload” feature ? Incorporate file watcher, and once service/model is updated, reupload code etc… ?
I always receive this error on reload: Unable to register Runner. Runner registration failed because another code runner is already attached. Please wait for one minute before connecting again.
So how to perform continual dev, debugging ?
Hi, Tomas.
I’ve tried with my application such steps:
- created handler;
- downloaded js code;
- made ‘npm i’
4 made ‘npm run debug’ -> and i’ve saw my handler
- stoped coderunner with Ctrl+C -> handler have disapperared
5a. changed code (not necessary)
- made ‘npm run debug’ -> connected again without any error messages
What steps do you perform ?
What is your appId ?
There is no special steps to replicate, for me every time i make a change and stop code runner and run it again I have to wait at least 1 minute. So if you for example just add some value or copy/paste code and rerun solution, it will get to that state.
SO I asked if there is way like for example IONIC devs have, when you save your JS file, it will automatically update changes.
Here is example situation:
Tomass-MacBook-Pro:Backend tomasradvansky$ npm run debug
> PlusCo-servercode@1.0.0 debug /Users/tomasradvansky/Documents/Projects/Titans/PlusCo/Backend
> coderunner debug
16:18:28.478 - CodeRunner(tm) Backendless JavaScript CodeRunner v4.4.2
16:18:28.480 - Copyright(C) 2017 Backendless Corp. All rights reserved.
16:18:28.528 - Starting Debug Code Runner...
16:18:28.528 - Building Model..
16:18:30.689 - Model Build completed
16:18:30.689 - Custom Types (4):
16:18:30.689 - GroupMessages (models/GroupMessages.js)
16:18:30.689 - Groups (models/Groups.js)
16:18:30.689 - Messages (models/Messages.js)
16:18:30.689 - Requests (models/Requests.js)
16:18:30.689 - Services (1):
16:18:30.690 - EventsService (services/events-service.js)
16:18:31.037 - Registering Code Runner on https://api.backendless.com
16:18:31.721 - Runner successfully registered.
16:18:31.722 - Registering Model on https://api.backendless.com
16:18:32.929 - Model successfully registered
16:18:32.929 - Waiting for Server Code tasks..
^C16:18:35.273 - Termination signal received. Shutting down..
16:18:35.275 - Termination signal received. Shutting down..
Tomass-MacBook-Pro:Backend tomasradvansky$ npm run debug
> PlusCo-servercode@1.0.0 debug /Users/tomasradvansky/Documents/Projects/Titans/PlusCo/Backend
> coderunner debug
16:18:37.517 - CodeRunner(tm) Backendless JavaScript CodeRunner v4.4.2
16:18:37.519 - Copyright(C) 2017 Backendless Corp. All rights reserved.
16:18:37.560 - Starting Debug Code Runner...
16:18:37.560 - Building Model..
16:18:39.556 - Model Build completed
16:18:39.556 - Custom Types (4):
16:18:39.557 - GroupMessages (models/GroupMessages.js)
16:18:39.557 - Groups (models/Groups.js)
16:18:39.557 - Messages (models/Messages.js)
16:18:39.557 - Requests (models/Requests.js)
16:18:39.557 - Services (1):
16:18:39.557 - EventsService (services/events-service.js)
16:18:39.847 - Registering Code Runner on https://api.backendless.com
16:18:40.453 - Unable to register Runner. Runner registration failed because another code runner is already attached. Please wait for one minute before connecting again.
Tomass-MacBook-Pro:Backend tomasradvansky$
ID should be: 02E0B487-71CE-DB1E-FF7F-79892D128500