小编Hug*_*ero的帖子

无服务器部署:发生可恢复错误(写入 ECONNRESET),休眠约 5 秒。尝试 4 个中的 1 个

我一直在尝试在 Lambda 函数上使用 nodejs 部署我的 GraphQl Apollo 服务器,在无服务器离线状态下它运行良好,当我尝试部署它时失败并显示错误:“发生可恢复错误(写入 ECONNRESET),睡眠约 5 秒. 尝试 1 of 4" 一旦出现错误,控制台将退出进程,没有其他消息 一旦出现错误,控制台将退出进程,没有其他消息

我正在使用 Typescript 和 Webpack

我已经做了什么:

  1. 验证所有依赖项和类型
  2. 警告更正
  3. 使用无服务器离线插件对其进行测试,并在本地完美运行

yml文件:

service: apollo-sever-kisbel

custom:
  webpack:
    webpackConfig: ./webpack.config.js
    includeModules: true


plugins:
  - serverless-webpack
  - serverless-offline

provider:
  name: aws
  runtime: nodejs12.x
  stage: dev


functions:
  graphql:
    handler: lib/index.graphqlHandler
    events:
      - http:
          path: "{proxy+}"
          method: any
          cors: true
Run Code Online (Sandbox Code Playgroud)

干杯!

amazon-s3 node.js aws-lambda graphql serverless

5
推荐指数
1
解决办法
1837
查看次数

React 纯 Javascript 上的 Photo Sphere Viewer

我正在尝试在我的 React 组件上实现 Photo Sphere Viewer,我已经使用 Google Maps API 实现了它并且运行良好,但我使用的是相同的技术,但没有结果。如果有任何其他选项可以在 React 上实现 360 度全景照片查看器(已经使用过 Pannellum,不喜欢它,没有工作),我愿意接受建议。

https://photo-sphere-viewer.js.org/

我从以下位置获得了 html 代码:https : //github.com/JeremyHeleine/Photo-Sphere-Viewer/blob/master/examples/example.html

<head>
    <meta charset="utf-8" />
    <title>Photo Sphere Viewer</title>
    <meta name="viewport" content="initial-scale=1.0" />
    <script src="./three.min.js"></script>
    <script src="./photo-sphere-viewer.min.js"></script>
    <style>
        html, body {
            margin: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        #container {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <div id="container"></div>

    <script>
        var div = document.getElementById('container');
        var PSV = new PhotoSphereViewer({
                panorama: 'http://tassedecafe.org/wp-content/uploads/2013/01/parc-saint-pierre-amiens.jpg',
                container: div,
                time_anim: 3000,
                navbar: true, …
Run Code Online (Sandbox Code Playgroud)

html javascript photosphere reactjs photosphereviewer

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