tumobi / nideshop

NideShop 开源微信小程序商城服务端 API(Node.js + ThinkJS)
https://www.nideshop.com/
MIT License
5.57k stars 1.79k forks source link

编译出错 #17

Closed xjl271314 closed 6 years ago

xjl271314 commented 6 years ago

npm run compile

error:SyntaxError: src/common/config/adapter.js: Unexpected token, expected ; (1:8)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! nideshop@1.0.0 compile: babel --no-babelrc src/ --presets think-node --out-dir app/ npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the nideshop@1.0.0 compile script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

const fileCache = require('think-cache-file'); const {Console, File, DateFile} = require('think-logger3'); const path = require('path'); const database = require('./database.js'); const isDev = think.env === 'development';

/**

exports.cache = { type: 'file', common: { timeout: 24 60 60 1000 }, file: { handle: fileCache, cachePath: path.join(think.ROOT_PATH, 'runtime/cache'), // absoulte path is necessarily required pathDepth: 1, gcInterval: 24 60 60 1000 // gc interval } };

/**

exports.model = { type: 'mysql', common: { logConnect: isDev, logSql: isDev, logger: msg => think.logger.info(msg) }, mysql: { handle: mysql, database: 'nideshop', prefix: 'nideshop_', encoding: 'utf8mb4', host: '127.0.0.1', port: '3306', user: 'root', password: '我的密码', dateStrings: true } };

我检查了adapter.js语法应该没错的 能帮助一起找一下原因吗?