Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不能正确部署 #5

Open
piaohan opened this issue Jul 25, 2019 · 7 comments
Open

不能正确部署 #5

piaohan opened this issue Jul 25, 2019 · 7 comments

Comments

@piaohan
Copy link

piaohan commented Jul 25, 2019

根据文档使用了2中方法 都报错,报错如下:

/home/ubuntu/shareAPI/node_modules/koa/lib/application.js:62
  listen(...args) {
         ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/ubuntu/shareAPI/node_modules/@shuangren/share-api/server/app.js:39:11)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

@ShuangRen
Copy link
Owner

你的node 版本过低,不支持...运算符
服务底层使用的是koa2
一般建议nodejs v8.0级以上,否则很多特性不支持
请检查你的node 版本并升级

@ShuangRen
Copy link
Owner

稍后会在readme里面 加上node 以及npm 最低版本要求

@ShuangRen
Copy link
Owner

你好,请问问题解决了吗?

@piaohan
Copy link
Author

piaohan commented Jul 29, 2019

@ShuangRen 谢谢,但是我想应该不会是版本过低的原因,我是直接安装的官网最新版本

@ShuangRen
Copy link
Owner

方便提供版本号供调试吗

@piaohan
Copy link
Author

piaohan commented Aug 3, 2019

$ npm -v
6.9.0

$ node -v
v10.16.0

@wellenzhong
Copy link

能正常部署
node v10.15.3
npm 6.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants