如下,且使用npm与cnpm没有区别,nodejs和npm都是最新版,mongodb已通过宝塔安装
`[root@iZva01gaj2xsb8Z bilibili_blacklist]# cnpm install
✔ Installed 18 packages
✔ Linked 149 latest versions
[1/1] scripts.postinstall ejs@^2.5.6 run "node ./postinstall.js", root: "/www/wwwroot/bilibili/bilibili_blacklist/node_modules/_ejs@2.7.4@ejs"
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
[1/1] scripts.postinstall ejs@^2.5.6 finished in 97ms
✔ Run 1 scripts
deprecate @types/[email protected] › @types/form-data@* This is a stub types definition. form-data provides its own type definitions, so you do not need this installed.
deprecate [email protected] › superagent@^3.8.3 Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header). This notice will go away with v5.0.2+ once it is released.
Recently updated (since 2020-02-15): 1 packages (detail see file /www/wwwroot/bilibili/bilibili_blacklist/node_modules/.recently_updates.txt)
✔ All packages installed (181 packages installed from npm registry, used 6s(network 6s), speed 1.74MB/s, json 167(579.56kB), tarball 9.71MB)
[root@iZva01gaj2xsb8Z bilibili_blacklist]# cnpm run build && node .
[email protected] build /www/wwwroot/bilibili/bilibili_blacklist
tsc
node_modules/_@[email protected]@@types/mongodb/index.d.ts:878:7 - error TS2304: Cannot find name 'unknown'.
878 unknown extends U ? ObjectId : U
~~~~~~~
src/database.ts:38:93 - error TS2314: Generic type 'InsertOneWriteOpResult' requires 1 type argument(s).
38 public insertOne(tableName: string, data: any, afterDoneSuccessfully: OperationCallback<mongo.InsertOneWriteOpResult>) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build 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! /root/.npm/_logs/2020-02-22T01_01_51_266Z-debug.log
`