小编S0A*_*1E2的帖子

语法错误:运行 Nestjs 时出现无效或意外的标记

当我运行此nestjs代码时,遇到错误:

SyntaxError: Invalid or unexpected token
Run Code Online (Sandbox Code Playgroud)

是什么原因?

import {Controller, Get, Bind, Req, Post} from '@nestjs/common';

@Controller('cats')
export class catsController {
    @Post()
    create() {
        return "this is a action 1ss"
    }
    @Get()
    @Bind(Req())
    findAll(request) {
        return "this is a action";
    }
}
Run Code Online (Sandbox Code Playgroud)

javascript syntax-error node.js nestjs

2
推荐指数
1
解决办法
5442
查看次数

标签 统计

javascript ×1

nestjs ×1

node.js ×1

syntax-error ×1