Facing issue while starting with the loopback 4 "getting-started" application.
All steps were followed as mentioned in the link to set up a new lb4 application.
After the application got created, the 'npm start' was unable to start the application.
[Note: I did not make any change to the project after it was created.]
Below is the error after trying to start the application.
`npm start
[email protected] restart ....\hello-world
npm run build
[email protected] build ....\hello-world
lb-tsc
[email protected] start ....\hello-world
node -r source-map-support/register .
Cannot start the application. TypeError: events_1.once is not a function
at HttpServer.start (....\hello-worldnode_modules\@loopback\http-server\src\http-server.ts:121:11)
at RestServer.start (....\hello-worldnode_modules\@loopback\rest\src\rest.server.ts:954:28)
at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node -r source-map-support/register .
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! ....\AppData\Roaming\npm-cache_logs\2020-05-24T13_31_05_575Z-debug.log`
What鈥檚 your node version? We require 10 or above.
same issue with node v10.12.0, but after use v12.16.0 problem solved.
The once method was added in: v11.13.0, v10.16.0. See https://nodejs.org/api/events.html#events_events_once_emitter_name. Please use Node.js 10.16.0 or later.
CC @bajtos
The
oncemethod was added in: v11.13.0, v10.16.0. See https://nodejs.org/api/events.html#events_events_once_emitter_name. Please use Node.js 10.16.0 or later.CC @bajtos
Thanks. It worked. I had10.15.x version. I updated it and its working now.