[64, 1]: space indentation expected
[15, 27]: Missing semicolon
[109, 36]: missing whitespace
[111, 24]: missing whitespace
[70, 1]: Consecutive blank lines are forbidden
Run Code Online (Sandbox Code Playgroud)
我一直在收到TSLint的警告.有大量的警告,手动修复它将非常困难.
我正在寻找一种可以自动修复大多数警告的方法.
我尝试在 Heroku 上部署 Node.js API,但显示应用程序错误。
所以,使用“ heroku local web ”命令来测试任何错误..并得到一个错误,说'babel-node'不是内部或外部命令,也不是可运行的程序或批处理文件。
另一方面,当我运行命令“npm start”时,我没有收到任何错误并且服务器开始运行。
包.json
{
"name": "apollo-starter-kit",
"version": "0.1.0",
"description": "Minimal set of code to write a GraphQL server with Apollo graphql-tools",
"scripts": {
"start": "nodemon ./server.js --exec babel-node",
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint ."
},
"repository": {
"type": "git",
"url": "git+https://github.com/apollostack/apollo-starter-kit.git"
},
"keywords": [
"Node.js",
"Javascript",
"GraphQL",
"Express",
"Apollo",
"Meteor"
],
"author": "Jonas Helfer <jonas@helfer.email>",
"license": "MIT",
"bugs": {
"url": "https://github.com/apollostack/apollo-starter-kit/issues" …Run Code Online (Sandbox Code Playgroud) 最后的控制台返回空数组.控制台在ids.map函数完成之前运行
var ids = [];
var allLync = []
var user = await User.findOne(args.user)
ids.push(user._id)
user.following.map(x => {
ids.push(x)
})
ids.map(async x => {
var lync = await Lync.find({ "author": x })
lync.map(u => {
allLync.push[u]
})
})
console.log(allLync)
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
node.js ×2
angular ×1
async-await ×1
babeljs ×1
ecmascript-6 ×1
heroku ×1
javascript ×1
mongoose ×1
promise ×1
tslint ×1
typescript ×1
warnings ×1