运行amplify init --appId XXX时的语法错误

时间:2019-12-09 08:26:43

标签: amazon-web-services aws-amplify aws-amplify-cli

我正在使用放大控制台编写一个React Webapp。安装cli时,我遵循“设置您的后端环境”下的步骤,包括:

$ npm install -g @aws-amplify/cli

$ amplify init --appId IDNUMBER

但是第二个命令抛出此错误消息:

Unexpected token d in JSON at position 0
SyntaxError: Unexpected token d in JSON at position 0
    at JSON.parse (<anonymous>)
    at normalizeValue (/usr/lib/node_modules/@aws-amplify/cli/lib/lib/input-params-manager.js:31:32)
    at /usr/lib/node_modules/@aws-amplify/cli/lib/lib/input-params-manager.js:6:31
    at Array.forEach (<anonymous>)
    at normalizeInputParams (/usr/lib/node_modules/@aws-amplify/cli/lib/lib/input-params-manager.js:4:45)
    at constructExeInfo (/usr/lib/node_modules/@aws-amplify/cli/lib/commands/init.js:72:22)
    at /usr/lib/node_modules/@aws-amplify/cli/lib/commands/init.js:52:21
    at step (/usr/lib/node_modules/@aws-amplify/cli/lib/commands/init.js:33:23)
    at Object.next (/usr/lib/node_modules/@aws-amplify/cli/lib/commands/init.js:14:53)
    at /usr/lib/node_modules/@aws-amplify/cli/lib/commands/init.js:8:71

我无法识别它尝试读取的JSON文件。

0 个答案:

没有答案