我正在尝试运行命令npm run build:lambda,但它不断给出语法错误:
****:git user$ npm run build:lambda
> git@1.0.0 build:lambda /Users/****/git
> netlify-lambda build functions-active
netlify-lambda: Building functions
{ [SyntaxError: Expected "'", "'''", "+", "-", "[", """, """"", "_", "false", "true", "{", [ t] or [0-9] but "u201C" found.]
message:
'Expected "'", "'''", "+", "-", "[", "\"", "\"\"\"", "_", "false", "true", "{", [ \t] or [0-9] but "\u201C" found.',
expected:
[ { type: 'literal', value: ''', description: '"'"' },
{ type: 'literal', value: ''''', description: '"'''"' },
{ type: 'literal', value: '+', description: '"+"' },
{ type: 'literal', value: '-', description: '"-"' },
{ type: 'literal', value: '[', description: '"["' },
{ type: 'literal', value: '"', description: '"\""' },
{ type: 'literal', value: '"""', description: '"\"\"\""' },
{ type: 'literal', value: '_', description: '"_"' },
{ type: 'literal', value: 'false', description: '"false"' },
{ type: 'literal', value: 'true', description: '"true"' },
{ type: 'literal', value: '{', description: '"{"' },
{ type: 'class', value: '[ \t]', description: '[ \t]' },
{ type: 'class', value: '[0-9]', description: '[0-9]' } ],
found: '“',
offset: 22,
line: 2,
column: 15,
enter code here`
我的netlify.toml配置了:
[build]
functions = “lambda“
并具有包裹。JSON配置:
"scripts": {
"start:lambda": "netlify-lambda serve src/lambda",
"build:lambda": "netlify-lambda build functions-active"
},
看来我缺少一些基本的东西,但似乎无法弄清楚什么..有什么帮助吗?谢谢!
现在看到我正在使用错误的报价,新秀错误..
" lambda"而不是" lambda"