【问题标题】:(error) AWS as backend installing amplify libraries(错误)AWS 作为后端安装放大库
【发布时间】:2021-04-09 11:58:01
【问题描述】:

我是后端新手。刚开始在反应中制作待办事项应用程序,并且只是为后端设置亚马逊 aws。使用此站点作为参考 (https://docs.amplify.aws/start/getting-started/setup/q/integration/react#initialize-a-new-backend)。

安装 Amplify 库时,当我在根目录中键入 npm install aws-amplify @aws-amplify/ui-react 时,它每次都显示错误。[错误图片][1] 我尝试了很长时间,但没有找不到任何解决方案。请帮助我解决这个问题!

[1]: https://i.stack.imgur.com/hrSeJ.png 这是我在命令提示符中遇到的错误????

npm ERR! Unexpected end of JSON input while parsing near '...:"^1.0.0-beta.2","@aw'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Aakash~1Bansal\AppData\Roaming\npm-cache\_logs\2021-04-09T11_41_43_000Z-debug.log

F:\Learning- tanay pratap\AWS\react-amplified>npm install aws-amplify @aws-amplify/ui-react
npm ERR! Unexpected end of JSON input while parsing near '...:"^1.0.0-beta.2","@aw'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Aakash~1Bansal\AppData\Roaming\npm-cache\_logs\2021-04-09T11_45_14_875Z-debug.log

F:\Learning- tanay pratap\AWS\react-amplified>

【问题讨论】:

    标签: reactjs amazon-web-services npm aws-amplify


    【解决方案1】:

    我遇到了同样的问题。 1st确保您的PC连接到互联网连接。运行:

    npm uninstall -g @aws-amplify/cli
    
    npm install -g @aws-amplify/cli
    

    如果可能,不要最小化窗口,等到一切都正确安装。

    这对我有用。

    您仍然遇到问题,然后重新安装 node.js,然后执行此操作。

    谢谢!

    【讨论】:

    • 感谢您的回答,但在尝试了很长时间并没有解决问题后,我为我的项目从 AWS amplify 转移到了 google firebase。
    猜你喜欢
    • 2020-02-02
    • 2021-09-27
    • 1970-01-01
    • 2012-11-03
    • 1970-01-01
    • 2014-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多