0

我正在尝试运行命令 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“

并将 package.json 配置为:

   "scripts": {
    "start:lambda": "netlify-lambda serve src/lambda",
    "build:lambda": "netlify-lambda build functions-active"
  },

似乎我缺少一些基本的东西,但似乎无法弄清楚是什么......有什么帮助吗?谢谢!

4

1 回答 1

0

刚刚看到我使用了错误的报价,菜鸟错误....

“lambda”而不是“lambda”

于 2019-06-25T09:43:50.427 回答