TSError: ⨯ Unable to compile TypeScript:
src/middlewares/ErrorHandlingMiddleware.ts:7:31 - error TS2339: Property 'status' does not exist on type 'ApiError'.
7 return res.status(err.status).json({message: err.message});
~~~~~~
at createTSError (/home/ihor/Test Task by Komah Ihor/node_modules/ts-node/src/index.ts:587:12)
at reportTSError (/home/ihor/Test Task by Komah Ihor/node_modules/ts-node/src/index.ts:591:19)
at getOutput (/home/ihor/Test Task by Komah Ihor/node_modules/ts-node/src/index.ts:921:36)
at Object.compile (/home/ihor/Test Task by Komah Ihor/node_modules/ts-node/src/index.ts:1189:32)
at Module.m._compile (/home/ihor/Test Task by Komah Ihor/node_modules/ts-node/src/index.ts:1295:42)
at Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Object.require.extensions.<computed> [as .ts] (/home/ihor/Test Task by Komah Ihor/node_modules/ts-node/src/index.ts:1298:12)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Module.require (internal/modules/cjs/loader.js:957:19)
[nodemon] app crashed - waiting for file changes before starting...
passport.use(new localStrategy({ usernameField: 'email' }, (email, password, done) => {
User.findOne({ email: email.toString()}, (err, user) => {
if (err) { return done(err); }
if (!user) {
return done(null, false, { msg: `Email ${email} not found.` });
}
user.comparePassword(password.toString() , (err, isMatch) => {
if (err) { return done(err); }
if (isMatch) { return done(null, user); }
return done(null, false, { msg: 'Invalid email or password.' });
});
});
}));
node-pre-gyp WARN Tried to download(404): https://github.com/JCMais/node-libcurl/releases/do...
node-pre-gyp WARN Pre-built binaries not found for node-libcurl@1.3.3 and node@7.10.0 (node-v51 ABI, glibc) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/7.10.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/ihor/gm_crm/node_modules/node-libcurl/.node-gyp"
make: вход в каталог «/home/ihor/gm_crm/node_modules/node-libcurl/build»
make: *** Нет правила для сборки цели «../.node-gyp/7.10.0/include/node/common.gypi», требуемой для «Makefile». Останов.
make: выход из каталога «/home/ihor/gm_crm/node_modules/node-libcurl/build»
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/ihor/gm_crm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 5.11.0-40-generic
gyp ERR! command "/usr/local/bin/node" "/home/ihor/gm_crm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ihor/gm_crm/node_modules/node-libcurl/lib/binding/node_libcurl.node" "--module_name=node_libcurl" "--module_path=/home/ihor/gm_crm/node_modules/node-libcurl/lib/binding" "--node_abi_napi=node-v51" "--napi_build_version=0" "--node_napi_label=node-v51"
gyp ERR! cwd /home/ihor/gm_crm/node_modules/node-libcurl
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /home/ihor/gm_crm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ihor/gm_crm/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/home/ihor/gm_crm/node_modules/node-libcurl/lib/binding --node_abi_napi=node-v51 --napi_build_version=0 --node_napi_label=node-v51' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/ihor/gm_crm/node_modules/node-libcurl/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 5.11.0-40-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/ihor/gm_crm/node_modules/node-libcurl/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ihor/gm_crm/node_modules/node-libcurl
node-pre-gyp ERR! node -v v7.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /home/ihor/gm_crm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ihor/gm_crm/node_modules/node-libcurl/lib/binding/node_libcurl.node --module_name=node_libcurl --module_path=/home/ihor/gm_crm/node_modules/node-libcurl/lib/binding --node_abi_napi=node-v51 --napi_build_version=0 --node_napi_label=node-v51' (1)
npm WARN acorn-jsx@5.3.2 requires a peer of acorn@^6.0.0 || ^7.0.0 || ^8.0.0 but none was installed.
npm ERR! Linux 5.11.0-40-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-libcurl@1.3.3 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-libcurl@1.3.3 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-libcurl package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-libcurl
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-libcurl
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2021-11-17T08_14_13_047Z-debug.log