I was trying to run a github program from https://github.com/StartBootstrap/sb-clean-blog-angular . I faced this error when I run the command "npm start".
D:\Full-Stack-Development-Capstone\Frontend\sb-clean-blog-angular-1.2.0\scripts\start.js:14
}).then(success, failure);
^
TypeError: concurrently(...).then is not a function
at Object.<anonymous> (D:\Full-Stack-Development-Capstone\Frontend\sb-clean-blog-angular-1.2.0\scripts\start.js:14:4)
at Module._compile (node:internal/modules/cjs/loader:1112:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:834:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
Node.js v18.4.0
The script code
const concurrently = require('concurrently');
const port = process.env.PORT || 4200;
concurrently([
{ command: 'node scripts/pug-watch.js', name: 'PUG_WATCH', prefixColor: 'bgGreen.bold' },
{
command: `npm run ng -- serve --port ${port} --open`,
name: 'NG_SERVE',
prefixColor: 'bgBlue.bold',
}
], {
prefix: 'name',
killOthers: ['failure', 'success'],
}).then(success, failure);
function success() {
console.log('Success');
}
function failure() {
console.log('Failure');
}