You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT :
So yeah problem is managing dist folder name with the node version. For node version 8 (yours) you should use dist8. Last node version is 10.11.0, LTS version is 8.12.0. Maybe you have an output like this :
@pansitwattana thanks for your question, I was trying to implement a solution for live reloading and couldn't do it in a really clean way.
So if you are interested you will need nodemon (npm i --save-dev nodemon or npm i -g nodemon)
change the build:watch line to "build:watch": "lb-tsc es2018 --watch" by removing the --outDir you will not have problem with dist10/dist8 stuff.
change the prestart line in package.json to "prestart": "start npm run build:watch" it will open a new cmd watching for file changes with lb-tsc (loopback typescript compiler)
change the start line in package.json to "start": "nodemon --watch dist10" (or dist8 for node 8). It will restart node when dist folder is changed.
Activity
mightytyphoon commentedon Oct 6, 2018
Hi, the problem come from the name of the dist folder. If you rename it for dist10 it works.
As a quick fix, in package.json change the line :
"build": "lb-tsc es2017 --outDir dist"to
"build": "lb-tsc es2017 --outDir dist10"(also you can changees2017fores2018)EDIT 2 : you can also get rid of the --outDir, it should make your dist8 automatically.
It comes from this package : @loopback/dist-util.
EDIT :
So yeah problem is managing dist folder name with the node version. For node version 8 (yours) you should use dist8. Last node version is 10.11.0, LTS version is 8.12.0. Maybe you have an output like this :
Edit 3 : I think the problem comes from this : #1810
mightytyphoon commentedon Oct 6, 2018
@pansitwattana thanks for your question, I was trying to implement a solution for live reloading and couldn't do it in a really clean way.
So if you are interested you will need nodemon (
npm i --save-dev nodemonornpm i -g nodemon)"build:watch": "lb-tsc es2018 --watch"by removing the --outDir you will not have problem with dist10/dist8 stuff."prestart": "start npm run build:watch"it will open a new cmd watching for file changes with lb-tsc (loopback typescript compiler)"start": "nodemon --watch dist10"(or dist8 for node 8). It will restart node when dist folder is changed.mightytyphoon commentedon Oct 6, 2018
@pansitwattana fixed with version 0.30.0
dhmlau commentedon Oct 8, 2018
@pansitwattana , i'd like to close this issue as resolved. If you still encounter this issue, feel free to ping us here or open a new issue. Thanks.