profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/stephensamra/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

philsturgeon/awesome-earth 987

"What can I do about the climate crisis?" Here are 326 things you can do.

deetron101/vectors-edge-2020 0

Shell of a game in Unity3D

PublicEvent
MemberEvent

push eventstephensamra/mega-ui

Stephen Samra

commit sha b1c058cedb6350f8911632c2b5a5084f571097b1

0.0.2

view details

push time in a month

push eventstephensamra/mega-ui

Stephen Samra

commit sha 7628408872cb55795127b65ce904e4f39049f284

update name

view details

push time in a month

issue closedhasura/graphql-engine

hasura cli cannot access hasura cloud

I have a project in Hasura cloud (v2.0.4-cloud.2). When I try to run hasura console, I get the following error:

FATA[0002] {
  "path": "$",
  "error": "resource does not exist",
  "code": "not-found"
}

I am using a .env file with the endpoint and admin secret:

HASURA_GRAPHQL_ENDPOINT=https://xxxx.hasura.app/v1/graphql/
HASURA_GRAPHQL_ADMIN_SECRET=xxxx

Debug output:

❯ hasura console --log-level DEBUG
DEBU global config file exists, verifying contents
DEBU global config is pre-set to &cli.GlobalConfig{UUID:"cb351c7d-88e8-4a99-be62-390e904d0a8e", EnableTelemetry:true, ShowUpdateNotification:true, CLIEnvironment:"default"}
DEBU global config: uuid: cb351c7d-88e8-4a99-be62-390e904d0a8e
DEBU global config: enableTelemetry: true
DEBU global config: showUpdateNotification: true
DEBU global config: cliEnvironment: default
DEBU ENV vars read from: /xxxx/xxxx/xxxx/xxxx/.env
DEBU cannot get config information from server, this might be because config API is not enabled: error fetching server config: [not-found] resource does not exist ($)
DEBU graphql engine endpoint: https://xxxx.hasura.app/v1/graphql/
DEBU graphql engine admin_secret: xxxx
DEBU versions: cli: [v2.0.0-beta.1] server: []
DEBU compatibility check: [true] server with no version treated as pre-release build
DEBU telemetry: beamed                             fields.time=185.725285ms isError=true

I have enabled the config API via HASURA_GRAPHQL_ENABLED_APIS:

Screen Shot 2021-08-09 at 11 08 57

Am I missing something?

Thanks in advance.

closed time in a month

stephensamra

issue commenthasura/graphql-engine

hasura cli cannot access hasura cloud

Hi @scriptonist, thanks for the quick reply. That solved it. I'm not sure if it's related but the version has suddenly changed from v2.0.4-cloud.2 to v2.0.5-cloud.1.

stephensamra

comment created time in a month

issue openedhasura/graphql-engine

hasura cli cannot access hasura cloud

I have a project in Hasura cloud (v2.0.4-cloud.2). When I try to run hasura console, I get the following error:

FATA[0002] {
  "path": "$",
  "error": "resource does not exist",
  "code": "not-found"
}

I am using a .env file with the endpoint and admin secret:

HASURA_GRAPHQL_ENDPOINT=https://xxxx.hasura.app/v1/graphql/
HASURA_GRAPHQL_ADMIN_SECRET=xxxx

Debug output:

❯ hasura console --log-level DEBUG
DEBU global config file exists, verifying contents
DEBU global config is pre-set to &cli.GlobalConfig{UUID:"cb351c7d-88e8-4a99-be62-390e904d0a8e", EnableTelemetry:true, ShowUpdateNotification:true, CLIEnvironment:"default"}
DEBU global config: uuid: cb351c7d-88e8-4a99-be62-390e904d0a8e
DEBU global config: enableTelemetry: true
DEBU global config: showUpdateNotification: true
DEBU global config: cliEnvironment: default
DEBU ENV vars read from: /xxxx/xxxx/xxxx/xxxx/.env
DEBU cannot get config information from server, this might be because config API is not enabled: error fetching server config: [not-found] resource does not exist ($)
DEBU graphql engine endpoint: https://xxxx.hasura.app/v1/graphql/
DEBU graphql engine admin_secret: xxxx
DEBU versions: cli: [v2.0.0-beta.1] server: []
DEBU compatibility check: [true] server with no version treated as pre-release build
DEBU telemetry: beamed                             fields.time=185.725285ms isError=true

I have enabled the config API via HASURA_GRAPHQL_ENABLED_APIS:

Screen Shot 2021-08-09 at 11 08 57

Am I missing something?

Thanks in advance.

created time in a month

issue commentbrillout/vite-plugin-ssr

Testimonials

vite-plugin-ssr is an extremely well thought out plugin. Usually, SSR in Node.js involves a fair amount of complexity and often some haphazard, glued together solutions. This package is the exact opposite! The conventions are sensible, the API is stable and robust, all while being extensible with regards to how you build your app. I can't recommend it enough if you need SSR with Vite. We were building our app with Next.js but it eventually became too slow to build due to the amount of files (~15,000). After migrating to Vite + vite-plugin-ssr, we saw our build times drop 5x!

brillout

comment created time in 2 months

issue commentstephensamra/vite-ssr-pdf-issue

Externalized instead of non-externalizing

I managed to get this working by creating a pdf.page.tsx file and having the Page function return null and then rendering everything in a pdf.page.client.tsx file.

pdf.page.client.tsx is essentially the same as _default.page.client.tsx file but it uses is-react to determine if I should render pageContext.Page or the component tree defined in that pdf.page.client.tsx. This was necessary to ensure useClientRouter worked as expected.

brillout

comment created time in 2 months

issue commentstephensamra/vite-ssr-pdf-issue

Externalized instead of non-externalizing

Thanks, I'll have a go. If you have a general outline of what would be involved, that would be great.

brillout

comment created time in 2 months

issue commentstephensamra/vite-ssr-pdf-issue

Externalized instead of non-externalizing

We were just discussing that - this code probably shouldn't run on the server anyway so we should be able to skip SSR for this page.

brillout

comment created time in 2 months

issue commentstephensamra/vite-ssr-pdf-issue

Externalized instead of non-externalizing

Thanks. It's been changed to external now. New error message is:

import PdfHighlighter from "./components/PdfHighlighter";
^^^^^^

SyntaxError: Cannot use import statement outside a module

I've updated the readme with the full output.

brillout

comment created time in 2 months

push eventstephensamra/vite-ssr-pdf-issue

Stephen Samra

commit sha fd0a5795801cd18bd571a886bf2e96a7ea22490f

noExternal => external

view details

push time in 2 months

push eventstephensamra/vite-ssr-pdf-issue

Stephen Samra

commit sha 7b0d5dd9be3fbff7c2a1c451e02730ca72cf4fe1

update error message with latest output

view details

push time in 2 months

push eventstephensamra/vite-ssr-pdf-issue

Stephen Samra

commit sha ee63304de6c7ec528e065ee4f096999d7d87a1b9

add ssr.noExternal

view details

push time in 2 months

issue commentvitejs/vite

[SSR] Stop touching externalized dependencies

Reproduction is here: https://github.com/stephensamra/vite-ssr-pdf-issue

brillout

comment created time in 2 months

create barnchstephensamra/vite-ssr-pdf-issue

branch : main

created branch time in 2 months

created repositorystephensamra/vite-ssr-pdf-issue

created time in 2 months

issue commentbrillout/vite-plugin-ssr

Testimonials

@brillout absolutely! cc @LydiaF

brillout

comment created time in 2 months

issue commentbrillout/vite-plugin-ssr

Vue Typescript starter - import.meta.env unusuable

@brillout, you were right that ts-node was not picking up the tsconfig.json#ts-node options.

Adding a console.log inside ts-node for those options showed:

{
  "transpileOnly": undefined,
  "compilerOptions": undefined
}

However, when I inline those options in the package.json script like so:

"scripts": {
  "dev": "ts-node --transpile-only --compiler-options '{\"module\":\"CommonJS\"}' ./server",
}

... it shows:

{
  "transpileOnly": true, 
  "compilerOptions": { 
    "module": "CommonJS"
  }
}

Unfortunately, even with those options set, I still get the same error so I'm still looking into it. Thanks for the help thus far though!

zefman

comment created time in 2 months

issue commentbrillout/vite-plugin-ssr

Vue Typescript starter - import.meta.env unusuable

@brillout thanks, I will look into that.

zefman

comment created time in 2 months

issue commentbrillout/vite-plugin-ssr

Vue Typescript starter - import.meta.env unusuable

Correct, the IDE no longer shows it as an error. The yarn dev script is: ts-node ./server.

zefman

comment created time in 2 months

issue commentbrillout/vite-plugin-ssr

Vue Typescript starter - import.meta.env unusuable

@brillout, those changes to tsconfig.json did not work for me. In server/index.ts, I'm trying to import a file from src that contains references to import.meta, and I am getting this error when I run yarn dev:

/Users/stephen/.../src/config.ts:4
    graphqlEndpoint: import.meta.env.VITE_GRAPHQL_ENDPOINT,
                            ^^^^

SyntaxError: Cannot use 'import.meta' outside a module

My tsconfig.json file:

{
  "compilerOptions": {
    "target": "ESNext",
    "lib": [
      "DOM",
    ],
    "types": [
      "vite/client"
    ],
    "baseUrl": ".",
    "allowJs": false,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "module": "ES2020",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react",
    "noImplicitAny": false,
    "paths": {
      "src/*": [
        "./src/*"
      ]
    }
  },
  "include": [
    "./src",
    "./server"
  ],
  "ts-node": {
    "transpileOnly": true,
    "compilerOptions": {
      "module": "CommonJS"
    }
  }
}

Any help would be appreciated, thanks.

zefman

comment created time in 2 months