[error] ./config.json
Module build failed: SyntaxError: Unexpected token m in JSON at position 0
at JSON.parse ()
at Object.module.exports (/data/yapii/yapii/node_modules/json-loader/index.js:4:49)
@ ./server/yapi.js 12:13-38
[error] ./~/fs-extra/lib/empty/index.js
Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/fs-extra/lib/empty
@ ./~/fs-extra/lib/empty/index.js 4:11-24
[error] ./~/nodemailer/lib/mailer/index.js
Module not found: Error: Cannot resolve module 'net' in /data/yapii/yapii/node_modules/nodemailer/lib/mailer
@ ./~/nodemailer/lib/mailer/index.js 13:12-26
[error] ./~/nodemailer/lib/mailer/index.js
Module not found: Error: Cannot resolve module 'dns' in /data/yapii/yapii/node_modules/nodemailer/lib/mailer
@ ./~/nodemailer/lib/mailer/index.js 14:12-26
[error] ./~/nodemailer/lib/shared/index.js
Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/nodemailer/lib/shared
@ ./~/nodemailer/lib/shared/index.js 5:11-24
[error] ./~/nodemailer/lib/sendmail-transport/index.js
Module not found: Error: Cannot resolve module 'child_process' in /data/yapii/yapii/node_modules/nodemailer/lib/sendmail-transport
@ ./~/nodemailer/lib/sendmail-transport/index.js 3:14-38
[error] ./~/nodemailer/lib/smtp-connection/http-proxy-client.js
Module not found: Error: Cannot resolve module 'net' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection
@ ./~/nodemailer/lib/smtp-connection/http-proxy-client.js 7:12-26
[error] ./~/nodemailer/lib/smtp-connection/index.js
Module not found: Error: Cannot resolve module 'net' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection
@ ./~/nodemailer/lib/smtp-connection/index.js 5:12-26
[error] ./~/nodemailer/lib/smtp-connection/http-proxy-client.js
Module not found: Error: Cannot resolve module 'tls' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection
@ ./~/nodemailer/lib/smtp-connection/http-proxy-client.js 8:12-26
[error] ./~/nodemailer/lib/smtp-connection/index.js
Module not found: Error: Cannot resolve module 'tls' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection
@ ./~/nodemailer/lib/smtp-connection/index.js 6:12-26
[error] ./~/nodemailer/lib/dkim/index.js
Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/nodemailer/lib/dkim
@ ./~/nodemailer/lib/dkim/index.js 10:11-24
[error] ./~/graceful-fs/graceful-fs.js
Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/graceful-fs
@ ./~/graceful-fs/graceful-fs.js 1:9-22
[error] ./~/nodemailer/lib/mime-node/index.js
Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/nodemailer/lib/mime-node
@ ./~/nodemailer/lib/mime-node/index.js 7:11-24
[error] ./~/jsonfile/index.js
Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/jsonfile
@ ./~/jsonfile/index.js 5:8-21
[error] ./~/graceful-fs/fs.js
Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/graceful-fs
@ ./~/graceful-fs/fs.js 3:9-22
[error] index@c862efb6278400f441b1.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [../~/fs-extra/lib/util/assign.js:5,0]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yapii@2.2.0 build-client: NODE_ENV=production ykit pack -m
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yapii@2.2.0 build-client 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/2024-11-12T03_20_44_185Z-debug.log
什么问题
大佬 client build 不成功,怎么办
(python2.7) root@10-51-253-208 yapii# npm run build-client
[error] ./config.json Module build failed: SyntaxError: Unexpected token m in JSON at position 0 at JSON.parse ()
at Object.module.exports (/data/yapii/yapii/node_modules/json-loader/index.js:4:49)
@ ./server/yapi.js 12:13-38
[error] ./~/fs-extra/lib/empty/index.js Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/fs-extra/lib/empty @ ./~/fs-extra/lib/empty/index.js 4:11-24
[error] ./~/nodemailer/lib/mailer/index.js Module not found: Error: Cannot resolve module 'net' in /data/yapii/yapii/node_modules/nodemailer/lib/mailer @ ./~/nodemailer/lib/mailer/index.js 13:12-26
[error] ./~/nodemailer/lib/mailer/index.js Module not found: Error: Cannot resolve module 'dns' in /data/yapii/yapii/node_modules/nodemailer/lib/mailer @ ./~/nodemailer/lib/mailer/index.js 14:12-26
[error] ./~/nodemailer/lib/shared/index.js Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/nodemailer/lib/shared @ ./~/nodemailer/lib/shared/index.js 5:11-24
[error] ./~/nodemailer/lib/sendmail-transport/index.js Module not found: Error: Cannot resolve module 'child_process' in /data/yapii/yapii/node_modules/nodemailer/lib/sendmail-transport @ ./~/nodemailer/lib/sendmail-transport/index.js 3:14-38
[error] ./~/nodemailer/lib/smtp-connection/http-proxy-client.js Module not found: Error: Cannot resolve module 'net' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection @ ./~/nodemailer/lib/smtp-connection/http-proxy-client.js 7:12-26
[error] ./~/nodemailer/lib/smtp-connection/index.js Module not found: Error: Cannot resolve module 'net' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection @ ./~/nodemailer/lib/smtp-connection/index.js 5:12-26
[error] ./~/nodemailer/lib/smtp-connection/http-proxy-client.js Module not found: Error: Cannot resolve module 'tls' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection @ ./~/nodemailer/lib/smtp-connection/http-proxy-client.js 8:12-26
[error] ./~/nodemailer/lib/smtp-connection/index.js Module not found: Error: Cannot resolve module 'tls' in /data/yapii/yapii/node_modules/nodemailer/lib/smtp-connection @ ./~/nodemailer/lib/smtp-connection/index.js 6:12-26
[error] ./~/nodemailer/lib/dkim/index.js Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/nodemailer/lib/dkim @ ./~/nodemailer/lib/dkim/index.js 10:11-24
[error] ./~/graceful-fs/graceful-fs.js Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/graceful-fs @ ./~/graceful-fs/graceful-fs.js 1:9-22
[error] ./~/nodemailer/lib/mime-node/index.js Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/nodemailer/lib/mime-node @ ./~/nodemailer/lib/mime-node/index.js 7:11-24
[error] ./~/jsonfile/index.js Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/jsonfile @ ./~/jsonfile/index.js 5:8-21
[error] ./~/graceful-fs/fs.js Module not found: Error: Cannot resolve module 'fs' in /data/yapii/yapii/node_modules/graceful-fs @ ./~/graceful-fs/fs.js 3:9-22
[error] index@c862efb6278400f441b1.js from UglifyJs SyntaxError: Unexpected token: operator (>) [../~/fs-extra/lib/util/assign.js:5,0]
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! yapii@2.2.0 build-client:
NODE_ENV=production ykit pack -m
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yapii@2.2.0 build-client 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/2024-11-12T03_20_44_185Z-debug.log
什么原因
如何复现此问题
~